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

Adapter: ResponseStatusException message is not present in response body #232

Closed
sonallux opened this issue Oct 28, 2020 · 1 comment
Closed

Comments

@sonallux
Copy link
Contributor

The message of a ResponseStatusException is not added to the HTTP response body. I would expect the exception message to be present in the response body for easier debugging and error spotting.

Reproducible example

When adding a new Datasource (PUT /api/adapter/datasources) with an id already specified, the response does not contain the error message of the thrown ResponseStatusException from this line: https://github.com/jvalue/open-data-service/blob/8404c3761ac5f46cfbe3367253e2f61916eff3ea/adapter/src/main/java/org/jvalue/ods/adapterservice/datasource/api/rest/v1/DatasourceEndpoint.java#L43 Instead the response body just contains this:

{
    "timestamp": "2020-10-28T17:27:40.435+00:00",
    "status": 400,
    "error": "Bad Request",
    "message": "",
    "path": "/datasources"
}
@sonallux
Copy link
Contributor Author

Closed by #322

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

1 participant