-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Hystrix Javanica Error Propagation does not work correctly #332
Comments
Which hystrix/javanica version are you running - there were changes in #241 . |
I'm using 1.4.0-RC4 |
Ok, i found the problem: the exception will be propagated by following method in
But my custom exception is of type
The first item in my To solve my current problem i have to make sure that i'll only throw subclasses from |
@ChristianLohmann Thanks for the response. I need more time to investigate the issue and make fix, I'm gonna do it as soon as possible. looks like you'r right:
must be changed to
So I need to look deeper into your example to make a fix. Will do it ASAP |
Also need to rethrow original exception instead of throw Throwables.propagate(throwable); |
Thanks for Your fast response! |
…t work correctly)
I create PL #334 download jar https://drive.google.com/file/d/0B0O7Taelg2EaYm5yYUgtSlVSUHc/view?usp=sharing |
Thanks, it works like expected now! The ExceptionHandler now catches the right exceptions, even if they are checked exceptions. Waiting for the patch now ;) |
@ChristianLohmann , I'm glad to hear it. @benjchristensen could you please merge this changes? Also, does it make sence to make same changes into 1.3.x branch ? If most people use 1.4.+ then I guess PL into main branch is enough. Thoughts? |
Fix for issue #332 (Hystrix Javanica Error Propagation does not work cor...
My changes were merged to main branch, @ChristianLohmann can I close this issue. |
Yes please! Thanks again!
|
@benjchristensen assign please this issue to me or close it. |
Hi,
i'm very new to Hystrix/Javanica. But i think i found a bug in error propagation:
I have the following setup:
The getArticleModel() method is being called by a
RestController
method.When an
SkuParsingFailedException
is being catched, it will correctly wrap the newly thrown ModelNotFoundException into a HystrixBadRequestException. But when i try to catch any Exception with a@ControllerAdvice
and@ExceptionHandler
annotated method, i'll always catch aRuntimeException
with a wrappedModelNotFoundException
.handleModelNotFoundException()
will not be called. InsteadhandleAnyException()
will be called with aRuntimeException
as parameter.If i comment out the
@HystrixCommand
ignoreExceptions
property and replacethrow new ModelNotFoundException("Bad or incorrect SKU!", modelSku);
withthrow new HystrixBadRequestException("Bad or incorrect SKU given!",new ModelNotFoundException(modelSku));
then it works as expected and aModelNotFoundException
will be catched.Can anybody help?
Thanks!
The text was updated successfully, but these errors were encountered: