JSON Api should return 404 status code if a job doesn't exist
Open
- Dominant language
- JavaScript
- Stars
- 9.4k
- Forks
- 858
- PR merge metrics
- No merged PRs in 30d
Description
Making a GET request to `jobs/:id` endpoint with an not existing `id` the status code is **200 OK**
It should be a **404 Not found**
This would really help to deal with errors without parsing the response body.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the GET jobs/:id endpoint and reproduce the request with an id that does not exist. Trace how that case currently produces the JSON response, then make the endpoint return HTTP 404 instead of 200; done means nonexistent jobs produce the 404 status while existing-job behavior remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100