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

Allow additional information in error responses #41

Open
fscheel opened this issue Nov 13, 2017 · 1 comment
Open

Allow additional information in error responses #41

fscheel opened this issue Nov 13, 2017 · 1 comment

Comments

@fscheel
Copy link
Contributor

fscheel commented Nov 13, 2017

Currently, errors only return an HTTP error number (like 404), but no body at all. Some services may fail on multiple levels to find data in the database (like get /hfc/{submissionId}/cohort may fail to find the submission or it may fail to find an associated cohort). There is no way to convey which part could not be resolved.

@fscheel
Copy link
Contributor Author

fscheel commented Oct 7, 2018

With #83 I went a different way: The service will now return a 404 only, if the submission is not found. If there is the specified sub resource is not found, the service will return 200 with no body.

I'd like to use 204 (no content), but swagger only allows 1 Code of the 2XX family per response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant