Async API operations don't return error codes
Bug #1763289 reported by
Robert Ancell
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd |
Triaged
|
Medium
|
Unassigned |
Bug Description
Synchronous snapd API operations return an error string and optional "kind" on error:
{
"type": "error"
"status-code": 401,
"status": "Unauthorized",
"result": {
"message": "access denied",
"kind": "login-required",
}
}
Async operations can fail (as returned from /v2/changes):
{
...
"status": "Error",
"err": "Error text"
}
There is no error kind reported here, so a client can't tell what caused the async operation to fail. Suggest solution is to add an "errKind" field or similar to this object.
Changed in snapd: | |
importance: | Undecided → High |
status: | New → Triaged |
Changed in snapd: | |
importance: | High → Medium |
To post a comment you must log in.
I discussed this with John Lenton at the Budapest sprint, but I forgot to open a bug it seems.