-
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
Hook execution sequence issue #327
Conversation
Hystrix-pull-requests #157 FAILURE |
…ookFailedOnHystrixBadRequestWithSemaphoreIsolation
Hystrix-pull-requests #162 FAILURE |
Thanks for the unit test, I'll look at the second issue. For the first issue though the design has been that onComplete does NOT execute in a failed execution, onError does. If you want something that always fires at the end that would be like an The docs state: /**
* Invoked after completion of {@link HystrixCommand} execution that results in a response.
* <p>
* The response can come either from {@link HystrixCommand#run()} or {@link HystrixCommand#getFallback()}.
*
* @param commandInstance
* The executing HystrixCommand instance.
* @param response
* from {@link HystrixCommand#run()} or {@link HystrixCommand#getFallback()}.
* @return T response object that can be modified, decorated, replaced or just returned as a pass-thru.
*
* @since 1.2
*/
public <T> T onComplete(HystrixCommand<T> commandInstance, T response) {
/**
* Invoked after failed completion of {@link HystrixCommand} execution.
*
* @param commandInstance
* The executing HystrixCommand instance.
* @param failureType
* {@link FailureType} representing the type of failure that occurred.
* <p>
* See {@link HystrixRuntimeException} for more information.
* @param e
* Exception thrown by {@link HystrixCommand}
* @return Exception that can be decorated, replaced or just returned as a pass-thru.
*
* @since 1.2
*/
public <T> Exception onError(HystrixCommand<T> commandInstance, FailureType failureType, Exception e) { |
Unit test changes demonstrating these issues.