openml / openml/OpenML

Return error code 404 instead of 412 when dataset is not found

Open
#1,176 0 comments 1 reaction 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.