user-not-ready error from /dev/api/account is not specific enough

Bug #1726492 reported by Colin Watson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Software Center Agent
New
Undecided
Unassigned

Bug Description

_check_developer_preconditions responds with the same error code (user-not-ready) for the two cases of an unsigned developer agreement or an unset developer namespace. However, it's possible and desirable for a client to handle these and guide the user through any missing steps: build.snapcraft.io does this automatically, and I believe that the snapcraft team would like to. Unfortunately, at the moment that requires parsing the human-readable error message, which has led to some fairly predictable problems (see https://github.com/canonical-websites/build.snapcraft.io/pull/979).

It would be helpful to add fixed machine-readable codes for these errors so that we can make this more reliable. I wouldn't recommend changing the main error code from user-not-ready as client code is already relying on that, but perhaps a good approach would be to add an additional subsidiary error code to the "extra" dictionary.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.