openml / openml/OpenML

Response 412 for bad requests should be 400?

Open
#1,104 1 comment 0 reactions 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

As raised by Mitar in https://github.com/openml/OpenML/issues/1083, OpenML's use of the HTTP status code 412 is a bit weird.

We use 412 to indicate that the server could not answer the request because some information (e.g. a dataset id or an API key) was missing in the request. However, 412 is meant for cache validation.

Maybe we should simply use status 400 'Bad Request'.
Since clients probably use it, it would be best to leave it for now, and use code 400 for the next version of the API?

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 reading issue #1083 and tracing the API error handling that produces HTTP 412 responses for missing dataset IDs or API keys. Determine how a future API version should introduce HTTP 400 without breaking existing clients, then verify the affected responses and document the compatibility boundary.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
api, backend-api-design
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.