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": " '<>"}}
To rule out a different approach straight away: I think the naive approach of inventing error codes PasswordTooShort, UsernameCannotContainSpace, ... just doesn't scale.
-- 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.