-
Couldn't load subscription status.
- Fork 563
DATAREST-1143 - throw a ResourceNotFoundException instead of returning an http response with status code directly #284
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
Conversation
...g the http response directly. Changed to a ResourceNotFoundException is thrown, so it allows for custom error handling.
As this is my first contribution to spring-data all feedback is welcome.
Is there anything I need to do to move this forward?
jamarciano
commented
Oct 25, 2018
Is there anything preventing this from being merged going forward?
It would be very nice to be able to handle these exceptions normally; the alternatives aren't very intuitive and don't work quite as well as this would.
pkostrzewa
commented
Jan 3, 2019
@odrotbohm Any thoughts on this?
Sorry, this took so long. I'll schedule this for inclusion into Moore M2 (Spring Data REST 3.2).
...notFound(). This is to allow users to plug in custom exception handling to control these situations. Original pull request: #284.
In place now.
Uh oh!
There was an error while loading. Please reload this page.
Changed getItemResource to throw a ResourceNotFoundException instead of returning an empty ResponseEntity with a status code when an item can't be found. This will allow projects to use a ResponseEntityExceptionHandler and create a custom error message for 404 responses on GET requests, which is not possible at the moment.