Bug 23113

Summary: Connection.ConnectionError: Better error reporting for registration
Product: Telepathy Reporter: Simon McVittie <smcv>
Component: tp-specAssignee: Telepathy bugs list <telepathy-bugs>
Status: RESOLVED MOVED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: enhancement    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Simon McVittie 2009-08-03 10:09:55 UTC
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": " '<>"}}
Comment 1 Simon McVittie 2009-08-03 10:11:55 UTC
To rule out a different approach straight away: I think the naive approach of inventing error codes PasswordTooShort, UsernameCannotContainSpace, ... just doesn't scale.
Comment 2 GitLab Migration User 2019-12-03 20:18:23 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/telepathy/telepathy-spec/issues/31.

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.