Closed edeutsch closed 4 years ago
@edeutsch apparently the error code for Not Yet implemented is 501
. The 450
is used for Easter eggs? .
See the error code explanation in Wikipedia:
https://en.wikipedia.org/wiki/List_of_HTTP_status_codes
501 Not Implemented The server either does not recognize the request method, or it lacks the ability to fulfil the request. Usually this implies future availability (e.g., a new feature of a web-service API).[64]
My objection to this was that my reading of the original specification is that 501 means something else very specific: that is the server does not implement the HTTP method, e.g. GET, POST, OPTIONS, PUT, DELETE, etc.: https://www.checkupdown.com/status/E501.html
So 501 would be completely appropriate if someone sent an HTTP PUT to /datasets and /datasets does not support PUT, only GET.
But you are right that the wikipedia article seems to interpret this very liberally.
I would vote against overloading an error code that seems to have a different meaning in the official standard, and would suggest we pick a new code. But I am happy to go with whatever the group decides.
Hi Eric:
Reading a little bit more about this here: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/501
Is clear for future implementation should be using 501
for method not allowed (POST, PUT .. ) it should be 405
Method Not Allowed.
okay, I still feel that 501 is designed to mean something different than our meaning. But I agree it is the closest. So fine, let's go with 501.
We have agreed to go with 501. The PROXI status monitor: http://proteomecentral.proteomexchange.org/PROXI.php shows that some resources are returning 501. All other resources should update their system to return 501 when appropriate instead of 404 as some are doing now.
What should it look like when a PROXI server does not implement a particular endpoint?
I suggest returning HTTP error code 450:
http://proteomecentral.proteomexchange.org/api/proxi/v0.1/proteins?resultType=compact
{ "detail": "Although this is an officially defined PROXI endpoint, it has not yet been implemented at this server", "status": 450, "title": "Endpoint not implemented", "type": "about:blank" }
What do you think?