Skip to content
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

HTTPStatus-Codes in error-cases #203

Closed
AndreasSchultzGEA opened this issue Mar 10, 2021 · 4 comments
Closed

HTTPStatus-Codes in error-cases #203

AndreasSchultzGEA opened this issue Mar 10, 2021 · 4 comments

Comments

@AndreasSchultzGEA
Copy link
Collaborator

Hi,
my name is Andreas and I'm back ;-) and working together with Beate and Thomas at GEA.

If a request - e.q. for all locations - fail, a http-code != 200 should indicate what has failed.
For example, Authorisation-fails could be answered by 401, etc.
Exists plans to optimize this?

@cookeac
Copy link
Collaborator

cookeac commented Mar 11, 2021

Agreed. The standard set of HTTP codes should be available; and an error response returned.
There is some discussion of this with reference to POST semantics in #154 but the same approach should apply to GET.

@ahokkonen
Copy link
Contributor

Personally I would like to avoid complexity of passing different fail statuses for different cases. :)

I would say 401 and 403 are mandatory for describing failure for authentication/authorization, but for all the rest BL failures, in my opinion, 400 (Bad Request) response with additional text description for the error (error resource) is enough.

@ghost
Copy link

ghost commented Apr 21, 2021

From my past experience: if you want to have automated communication between multiple parties, the standard error cases have to be clear. For the ReST layer, I think error codes are a good way of handling the default error case. Otherwise we would have to agree on error codes between all the parties because if that is not done, all parties have to implement new error handling for each partner they communicate with.

Well, if the standard HTTP error codes are not sufficient to cover the default error cases, we should at least come up with a standard error scheme for our ICAR interface that becomes the default while leaving the option for parties to add additional codes. Just my 2 cents...

@cookeac
Copy link
Collaborator

cookeac commented Jul 15, 2021

Will be addressed by the semantics for POST event (#154) and the updates to the example URL schemes.

@cookeac cookeac closed this as completed Jul 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants