Return error code 404 instead of 412 when dataset is not found
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 755
- Forks
- 128
- PR merge metrics
- No merged PRs in 30d
Description
Description
Minor issue, but 404 is the default for when a resource does not exist.
See for instance https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses
404: "In an API, this can also mean that the endpoint is valid but the resource itself does not exist."
Steps/Code to Reproduce
test.openml.org/api/v1/json/data/9999999999
Expected Results
Error code 404 (Not Found)
Actual Results
Error code 412 (Precondition failed)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the missing-dataset request at test.openml.org/api/v1/json/data/9999999999 and trace the API handler that generates its response. Done means this request returns HTTP 404 Not Found rather than HTTP 412 Precondition Failed, with the relevant behavior covered by an appropriate test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100