Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XMPP errors: provide human-readable reason of join failure #172

Open
ge0rg opened this issue Oct 17, 2020 · 1 comment · Fixed by #178
Open

XMPP errors: provide human-readable reason of join failure #172

ge0rg opened this issue Oct 17, 2020 · 1 comment · Fixed by #178
Labels
T-Enhancement New features, changes in functionality, performance boosts, user-facing improvements.

Comments

@ge0rg
Copy link

ge0rg commented Oct 17, 2020

When an XMPP client fails to join a room, the error response is

<presence type="error" from="#bridged-room#[email protected]/nickname">
  <x xmlns="http://jabber.org/protocol/muc" />
  <error type="cancel" by="#bridged-room#[email protected]">
    <service-unavailable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" />
  </error>
</presence>

It would be great to also have a <text> element that would explain the actual cause of the error.

@ge0rg
Copy link
Author

ge0rg commented Oct 29, 2020

So I've tested the new code and the response is this:

<presence id="4c098a267b654351a25ad30578c1bdaf" to="[email protected]/poezio-IS8H" xml:lang="en" type="error" from="#bridged-room#[email protected]/Ge0rG">
  <x xmlns="http://jabber.org/protocol/muc"/>
  <error type="cancel" by="#bridged-room#[email protected]">
    <service-unavailable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
    <text>Failed to join room</text>
  </error>
</presence>

This has two issues:

  1. the <text> element MUST have the urn:ietf:params:xml:ns:xmpp-stanzas namespace (as has service-unavailable) to be interpreted correctly by clients
  2. "Failed to join room" is not actually a description of why it failed to join room.

@Half-Shot Half-Shot reopened this Oct 30, 2020
@jaller94 jaller94 added the T-Enhancement New features, changes in functionality, performance boosts, user-facing improvements. label May 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Enhancement New features, changes in functionality, performance boosts, user-facing improvements.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants