-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Can't use ZuulException in the filters #101
Comments
+1 on that issue. We can workaround that but with unnecessary logic of putting the exception in Request Context. Also the try - catch block in ZuulServlet serves no purpose if exceptions are happening in the filters and the error filters cannot be executed at all. Can the run method in IZuulFilter interface throw a ZuulException. In that case any other Exceptions in the filters can be wrapped in the ZuulException. If the above approach is fine, I can submit a pull request |
Any update on this?? I'm also having the same issue |
Why pull request was closed? :( I also need this. Currently throwing zuul exception is a headache in java code |
+1 There is a workaround (https://jmnarloch.wordpress.com/2015/09/16/spring-cloud-zuul-error-handling/) but that feels quite dirty and is creating more overhead than needed. It would be nice to throw a ZuulException with statuscode + errormessage from a filter. |
I was doing some cleanup on my fork and deleted the branch before it was merged, which auto closed the pull request. I can see about getting a new PR out, though keep in mind the PR was out there for 5+ months and not merged. |
You cant use ZuulException in the filter's run method because run not throws ZuulException and ZuulException is not RuntimeException
The text was updated successfully, but these errors were encountered: