Bug 34039 - Doesn't emit send errors if <message><error/> has no <body/>.
Summary: Doesn't emit send errors if <message><error/> has no <body/>.
Status: NEW
Alias: None
Product: Telepathy
Classification: Unclassified
Component: gabble (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-08 07:59 UTC by Will Thompson
Modified: 2011-02-08 07:59 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Will Thompson 2011-02-08 07:59:59 UTC
In response to a mailing list post about sending messages to JIDs without a node part being supported, I thought I'd quickly check out the state of what happens if you try to IM broken JIDs of various kinds.

If I send a message to a JID at a non-existent domain using my Prosody-powered personal account, no error is shown in Empathy, because Gabble doesn't emit any kind of error, which I believe is because the <message><error/> sent back by Prosody doesn't include the <body/> of the message I tried to send:

* message xmlns='jabber:client' type='chat' to='lol@lol.whut' id='08070725-c19f-4ceb-8174-9134cb5638d9'
    * body
        "delicious morsels"
    * active xmlns='http://jabber.org/protocol/chatstates'
wocky-DEBUG: 08/02/11 15:43:55.883311: _end_element_ns: Received stanza
* message xmlns='jabber:client' id='08070725-c19f-4ceb-8174-9134cb5638d9' type='error' to='will@willthompson.co.uk/b756e715' from='lol@lol.whut'
    * error type='cancel'
        * remote-server-not-found xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'
        * text xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'
            "Connection failed: DNS resolution failed"
gabble/im-DEBUG: 08/02/11 15:43:55.883466: _tp_send_error_from_error_node: got xmpp error: remote-server-not-found (type=1): a remote server or service specified as part or all of the JID of the intended recipient (or required to fulfill a request) could not be contacted within a reasonable amount of time
gabble/im-DEBUG: 08/02/11 15:43:55.883548: _tp_send_error_from_error_node: got xmpp error: remote-server-not-found (type=1): a remote server or service specified as part or all of the JID of the intended recipient (or required to fulfill a request) could not be contacted within a reasonable amount of time
wocky-DEBUG: 08/02/11 15:43:55.883605: handle_stanza: wocky-porter.c:1065: Stanza not handled

If I send the same message via my ejabberd-powered corporate JID, Gabble does emit a send error and failing delivery report:

wocky-DEBUG: 08/02/11 15:44:47.730443: _write_node_tree: Serializing tree:
* message xmlns='jabber:client' type='chat' to='lol@lol.whut' id='5b90b176-09c4-48ec-b8ef-123e5a0bf4fc'
    * body
        "tasty snacks"
    * active xmlns='http://jabber.org/protocol/chatstates'
wocky-DEBUG: 08/02/11 15:44:47.749000: _end_element_ns: Received stanza
* message xmlns='jabber:client' from='lol@lol.whut' to='will.thompson@collabora.co.uk/Queeg' type='error' id='5b90b176-09c4-48ec-b8ef-123e5a0bf4fc'
    * body
        "tasty snacks"
    * active xmlns='http://jabber.org/protocol/chatstates'
    * error code='404' type='cancel'
        * remote-server-not-found xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'
gabble/im-DEBUG: 08/02/11 15:44:47.749146: _tp_send_error_from_error_node: got xmpp error: remote-server-not-found (type=1): a remote server or service specified as part or all of the JID of the intended recipient (or required to fulfill a request) could not be contacted within a reasonable amount of time
gabble/im-DEBUG: 08/02/11 15:44:47.749222: _tp_send_error_from_error_node: got xmpp error: remote-server-not-found (type=1): a remote server or service specified as part or all of the JID of the intended recipient (or required to fulfill a request) could not be contacted within a reasonable amount of time
gabble/im-DEBUG: 08/02/11 15:44:47.749279: im_factory_message_cb: got error sending to lol@lol.whut (handle 173), msgtype 2, body:
tasty snacks

which Empathy shows as “Error sending message 'tasty snacks': unknown”. Obviously this is not much good for the user, but it's better than failing silently.

Arguably it would be kinder if Prosody echoed the body. But we should cope either way. (There's precedent for emitting failed delivery reports without knowing exactly which message couldn't be sent: Haze does this, and the spec explicitly allows for delivery reports with no delivery-echo.)


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.