api oops id is not exposed to client programs
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lazr.restful |
Triaged
|
High
|
Unassigned | ||
wrested |
Triaged
|
High
|
Unassigned |
Bug Description
At the moment if an API call fails with, for example, a 503 or 500
oops, you get back a quite large page of html. It is hard for client programs to do anything with this except dump it to the screen which is ugly. As a result many API failures do not have a visible oops, which makes it harder for the client to know what the problem is, or to give feedback to the Launchpad developers.
Launchpad apparently sends back an X-Lazr-OopsID on some (most?) failed requests. If this was parsed out and put into a structured field then clients could eg show a short message to the user about the failure, or accumulate a list of requests that failed and their corresponding oopses.
(Separately, it might be nice if the response to failed api requests was a json description of the problem, not html, but that's less important. It does not need to be a fine-grained description: just a dict pointing to the oops id, traceback, etc would be enough.)
no longer affects: | launchpad |
summary: |
- api oops id should be exposed to client programs + api oops id is not exposed to client programs |
I'm marking this invalid - let me explain.
We mark exceptions for machine readable status on a case by case basis. The infrastructure for doing it already exists.
If we haven't marked it as machine readable, then by definition its not machine readable yet. This bug is asking AIUI for a systematic 'make all not-marked exceptions machine readable'. I don't think this makes sense: we have a drive-to-zero policy on oopses and timeouts, and any exception that isn't marked as machine readable will show up in the lists of things we're driving to zero.
The result of a developers analysis of that will be to either fix it, or mark it as machine readable because its a logic error on the client causing it.
Either way, we don't need a work item saying we should do this, because we're already doing it.