Please investigate if
/api/v1.0/testcases/{testcase_name}/results
and
/api/v1.0/jobs/{job_id}/results
should return 404 if testcase_name/job_id don't exist. Docs [1] says that it should in the latter case but that doesn't reflect the code (or at least it seems to me it doesn't).
[1] http://docs.resultsdb.apiary.io/
This ticket had assigned some Differential requests: D75
For the record, the interaction looks like:
==== testcase doesn't exist==== $ curl http://127.0.0.1:5000/api/v1.0/testcases/test2/results { "data": [], "href": "http://127.0.0.1:5000/api/v1.0/testcases/test2/results", "next": "http://127.0.0.1:5000/api/v1.0/testcases/test2/results?page=1", "prev": null }
==== jobid doesn't exist ==== $ curl http://127.0.0.1:5000/api/v1.0/jobs/25/results { "data": [], "href": "http://127.0.0.1:5000/api/v1.0/jobs/25/results", "next": "http://127.0.0.1:5000/api/v1.0/jobs/25/results?page=1", "prev": null }
I'd rather see a 404 in these cases - returning no data implies that there are just no results. I suspect that the fix would be pretty easy, so I'm +1 to fixing it now. Yes, the system should continue to to work as long as we're not expecting an error in these cases (and it sounds like we're not) but the earlier we fix it, the less likely that anyone might start expecting this behavior.
Yup, thanks for the catch. There should be 404 thrown there.
rRSDB65cfdf9eb47126e42911aa60c6d5bb85a04cd079