-
Notifications
You must be signed in to change notification settings - Fork 56
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
Custom Exception Handling? #97
Comments
Hi, in your example you can change: throw new ResponseStatusException(HttpStatus.I_AM_A_TEAPOT); to return new HttpResponse(HttpStatus.I_AM_A_TEAPOT); If you want to redirect to some error page just return a response with |
hi, |
Hi Again, As promised I reviewed you're solution this morning and it is actually not what i was looking for. In you're solution I am redirecting the customer to the error page. I was looking for a solution that utilizes the spring-error handling with the customizable error-page. I updated my example project to illustrate the problem further.
|
Mentioned within issue: mkopylec/charon-spring-boot-starter#97
Mentioned within issue: mkopylec/charon-spring-boot-starter#97
Ok, so I implemented an custom-spring filter that throws the a ResponseStatusException. As it turns out, this also leads to an internal server error response, event though I set another status code within the exception. So, its not a problem with you're proxy but a spring one. Therefore I am closing this issue. However, for everyone interested, if I find a working solution I will update my example project accordingly. Thank you for you're help! |
Hi. |
Hi, However, i have found a solution and updated my example with a working solution. Thanks again for you're support. |
I would like to use the default error handling from spring boot when throwing an from within an custom interceptor.
This will display the spring-boot whitelabel error page, which I will be using. The main Problem is, that even though i throw an ResponseStatusException the response-status is allways 500.
I have created a small demo-project that demonstrates the problem here.
Anny Suggestions how I could handle this problem?
The text was updated successfully, but these errors were encountered: