Required field XMPP error found

* "not-acceptable" error sent when required field is not found

darcs-hash:20061120215831-86b55-460f3114e75cd77f263800d0a32dbf27add094eb.gz
This commit is contained in:
David Rousselie
2006-11-20 22:58:31 +01:00
parent 521f3cd892
commit 30979f1142
3 changed files with 10 additions and 8 deletions

View File

@@ -358,9 +358,8 @@ class JCLComponent(Component, object):
x_data.from_xml(query.children)
name = x_data.get_field_value("name")
if name is None:
# TODO : find correct error for mandatory field
info_query = info_query.make_error_response(\
"resource-constraint")
"not-acceptable")
self.stream.send(info_query)
return
self.db_connect()
@@ -390,8 +389,7 @@ class JCLComponent(Component, object):
field_default_func))
except FieldError, exception:
_account.destroySelf()
# TODO: get correct error from exception
info_query = info_query.make_error_response("resource-constraint")
info_query = info_query.make_error_response("not-acceptable")
self.stream.send(info_query)
self.db_disconnect()
return