module documentation
(source)

XMPP Error support.
Class ​Base​Error Base class for XMPP error exceptions.
Class ​Stanza​Error Stanza Error exception.
Class ​Stream​Error Stream Error exception.
Function exception​From​Stanza Build an exception object from an error stanza.
Function exception​From​Stream​Error Build an exception object from a stream error.
Constant CODES​_TO​_CONDITIONS Undocumented
Constant NS​_XML Undocumented
Constant NS​_XMPP​_STANZAS Undocumented
Constant NS​_XMPP​_STREAMS Undocumented
Constant STANZA​_CONDITIONS Undocumented
Function _parse​Error Parses an error element.
def exceptionFromStanza(stanza): (source)
Build an exception object from an error stanza.
Parameters
stanza:domish.Elementthe error stanza
Returns
StanzaErrorthe generated exception object
def exceptionFromStreamError(element): (source)
Build an exception object from a stream error.
Parameters
element:domish.Elementthe stream error
Returns
StreamErrorthe generated exception object
CODES_TO_CONDITIONS: dict = (source)

Undocumented

Value
{'302': ('gone', 'modify'),
 '400': ('bad-request', 'modify'),
 '401': ('not-authorized', 'auth'),
 '402': ('payment-required', 'auth'),
 '403': ('forbidden', 'auth'),
 '404': ('item-not-found', 'cancel'),
 '405': ('not-allowed', 'cancel'),
...
NS_XML: str = (source)

Undocumented

Value
'http://www.w3.org/XML/1998/namespace'
NS_XMPP_STANZAS: str = (source)

Undocumented

Value
'urn:ietf:params:xml:ns:xmpp-stanzas'
NS_XMPP_STREAMS: str = (source)

Undocumented

Value
'urn:ietf:params:xml:ns:xmpp-streams'
STANZA_CONDITIONS: dict = (source)

Undocumented

Value
{'bad-request': {'code': '400', 'type': 'modify'},
 'conflict': {'code': '409', 'type': 'cancel'},
 'feature-not-implemented': {'code': '501', 'type': 'cancel'},
 'forbidden': {'code': '403', 'type': 'auth'},
 'gone': {'code': '302', 'type': 'modify'},
 'internal-server-error': {'code': '500', 'type': 'wait'},
 'item-not-found': {'code': '404', 'type': 'cancel'},
...
def _parseError(error, errorNamespace): (source)
Parses an error element.
Parameters
error:domish.ElementThe error element to be parsed
error​Namespace:strThe namespace of the elements that hold the error condition and text.
Returns
dictDictionary with extracted error information. If present, keys condition, text, textLang have a string value, and appCondition has an domish.Element value.