OpenML
OpenML copied to clipboard
Response 412 for bad requests should be 400?
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?
+1 on 400 for bad requests (some argument is missing).
BTW, if API key is missing, then 401 should be returned.
But #1083 is about something else, I will comment there.