-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error status should contain only error code #67
Comments
At ProteomeCentral and PeptideAtlas, this is the way things look: First, if you give a bad URL, then our Python flask framework returns an answer like this: $ curl -i http://proteomecentral.proteomexchange.org/api/proxi/v0.1/xxx HTTP/1.1 404 NOT FOUND { I modeled the 501 message after this: $ curl -i http://proteomecentral.proteomexchange.org/api/proxi/v0.1/proteins?resultType=compact HTTP/1.1 501 NOT IMPLEMENTED { At PRIDE, the framework returns something that doesn't exist like this: $ curl -i http://wwwdev.ebi.ac.uk/pride/proxi/archive/v0.1/xxx HTTP/1.1 404 { and you're returning a 501 like this: $ curl -i http://wwwdev.ebi.ac.uk/pride/proxi/archive/v0.1/proteins?resultType=compact HTTP/1.1 501 { At MassIVE we have this: $ curl -i http://ccms-internal.ucsd.edu/ProteoSAFe/proxi/v0.1/xxx HTTP Status 404 - /ProteoSAFe/proxi/v0.1/xxxtype Status report message /ProteoSAFe/proxi/v0.1/xxx description The requested resource (/ProteoSAFe/proxi/v0.1/xxx) is not available. Apache Tomcat/6.0.24(that's HTML that may not render well in a GutHub issue)Even specifically asking for JSON doesn't seem to work: $ curl -i --header "Accept: application/json" http://ccms-internal.ucsd.edu/ProteoSAFe/proxi/v0.1/xxx HTTP/1.1 404 Not Found HTTP Status 404 - /ProteoSAFe/proxi/v0.1/xxxtype Status report message /ProteoSAFe/proxi/v0.1/xxx description The requested resource (/ProteoSAFe/proxi/v0.1/xxx) is not available. Apache Tomcat/6.0.24Seems like JSON should come back.. $ curl -i --header "Accept: application/json" http://ccms-internal.ucsd.edu/ProteoSAFe/proxi/v0.1/proteins?resultType=compact HTTP Status 501 - Although this is an officially defined PROXI endpoint, it has not yet been implemented at this servertype Status report message Although this is an officially defined PROXI endpoint, it has not yet been implemented at this server description The server does not support the functionality needed to fulfill this request (Although this is an officially defined PROXI endpoint, it has not yet been implemented at this server). Apache Tomcat/6.0.24What's the best way? I don't know. On the one hand it would be nice if all PROXI servers returned the same style for 400 and 404 and 500 and 501. On the other hand, Consistency among all errors for one server seems perhaps more useful. Too bad the different framework providers cannot even agree on the right way to do it. I rather like the way things work at ProteomeCentral and PeptideAtlas, the HTTP status has the right number and is also named. And the JSON is simple and consistent and provides a nice English language description of what the problem is. But that's just the Python Flask way of doing it. I'm happy to change error codes that I have control over (400 a no data 404 and a 501), but I don't have control over the framework provided bad URL 404 and 500, etc. Well, that's probably not completely true, there are probably ways to override the default behavior. Good fodder for discussion. |
Massive, PeptideAtlas, ProteomeCentral:
Hi, all, the Status Code in the URL should contain the word
Not Implemented
. It should be only the error code.We think the way to thought the message should be in the body: http://wwwdev.ebi.ac.uk/pride/proxi/archive/v0.1/proteins?resultType=compact
Lets discuss in the next meeting
The text was updated successfully, but these errors were encountered: