Connection.ConnectionError: Better error reporting for registration
Submitted by Simon McVittie
Assigned to Telepathy bugs list
Description
When using XMPP in-band registration, there are all sorts of things that can go wrong and end up signalled as InvalidArgument; for instance, "password too short", "requested username may not contain a space", ...; if we can find out from the server what was wrong (or tell from our knowledge of our XMPP that it won't work without even asking the server), then we should pass it on to the user.
We should use ConnectionError's Details dict to signal these in more detail.
For instance, if I try to register as "smcv <who doesn't understand XMPP syntax>
@jabber.org" we could do:
ConnectionError(InvalidArgument, {"invalid-char-in-param": {"username": " '<>
"}}