RESOLVED FIXED 204385
results.webkit.org/api/failures should return an error when no test-run is found for specified criteria
https://bugs.webkit.org/show_bug.cgi?id=204385
Summary results.webkit.org/api/failures should return an error when no test-run is fo...
Jonathan Bedard
Reported 2019-11-19 15:57:17 PST
This is a problem pretty unique to the failures endpoint, at the moment, since it's the only endpoint which is collapsing results from multiple test runs.
Attachments
Patch (6.52 KB, patch)
2019-11-19 16:01 PST, Jonathan Bedard
no flags
Patch for landing (6.50 KB, patch)
2019-11-22 14:43 PST, Jonathan Bedard
no flags
Jonathan Bedard
Comment 1 2019-11-19 15:57:46 PST
Jonathan Bedard
Comment 2 2019-11-19 16:01:43 PST
Aakash Jain
Comment 3 2019-11-21 09:24:53 PST
Comment on attachment 383916 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=383916&action=review rs=me > Tools/resultsdbpy/resultsdbpy/controller/failure_controller.py:86 > + abort(404, description='No test runs found with the specified criteria') should it be 404 or something else. It might make it hard to distinguish incorrect urls from correct urls returning 404.
Jonathan Bedard
Comment 4 2019-11-21 09:45:54 PST
Comment on attachment 383916 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=383916&action=review >> Tools/resultsdbpy/resultsdbpy/controller/failure_controller.py:86 >> + abort(404, description='No test runs found with the specified criteria') > > should it be 404 or something else. It might make it hard to distinguish incorrect urls from correct urls returning 404. The error messages for this is different 'No test runs found with the specified criteria' vs 'The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.'. We clearly need a 400 family error, I don't see one that fits better....maybe 406 or 425? But you kind of have to think creatively for why those fit.
Jonathan Bedard
Comment 5 2019-11-22 14:43:39 PST
Created attachment 384200 [details] Patch for landing
WebKit Commit Bot
Comment 6 2019-11-22 16:15:13 PST
Comment on attachment 384200 [details] Patch for landing Clearing flags on attachment: 384200 Committed r252815: <https://trac.webkit.org/changeset/252815>
WebKit Commit Bot
Comment 7 2019-11-22 16:15:14 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.