Instead of failing with Internal Server Error, return JSON formated
error message for queries containing unknown/unsupported status/outcome
like: http://.../resultsdb_api/api/v1.0/results?outcome=BADOUTCOME
Details
Details
- Reviewers
kparal tflink mkrizek - Maniphest Tasks
- T473: ResultsDB should not throw HTTP 500 on unknown state/outcome
- Commits
- rRSDB38c89bb0f107: Handle wrong status/outcome gracefully
Unittests
Diff Detail
Diff Detail
- Repository
- rRSDB resultsdb
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
| resultsdb/controllers/api_v1.py | ||
|---|---|---|
| 412 | Shouldn't a return retval be here? | |
| resultsdb/controllers/api_v1.py | ||
|---|---|---|
| 412 | Well, yes, it probably makes sense to add it there. Not really absolutely necessary, as the error will be caught anyway, but we at least won't do unnecessary steps in the code. Good catch, thanks! | |
Shouldn't a return retval be here?