Skip to content
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

BugFix: queue() BadRequestException Handling on Cached Response #184

Merged
merged 1 commit into from
Sep 27, 2013
Merged

BugFix: queue() BadRequestException Handling on Cached Response #184

merged 1 commit into from
Sep 27, 2013

Conversation

benjchristensen
Copy link
Contributor

The HystrixBadRequestException was being thrown directly instead of via the returned Future when a cached response was retrieved.

See included unit test for details.

The HystrixBadRequestException was being thrown directly instead of via the returned Future when a cached response was retrieved.

See included unit test for details.
@benjchristensen
Copy link
Contributor Author

@daveray Can you review this please to validate it fixes the issue you reported? This is definitely an edge case.

@cloudbees-pull-request-builder

Hystrix-pull-requests #50 SUCCESS
This pull request looks good

}

try {
new BadRequestCommand(circuitBreaker, ExecutionIsolationStrategy.THREAD).queue().get();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm guessing that because you're explicitly catching ExecutionException below that that's how you're sure the exception is coming from get() and not queue()?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, and if it's not an ExecutionException it will end up in the next Exception catch block and fail the test.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool. Looks good to me.

benjchristensen added a commit that referenced this pull request Sep 27, 2013
…ption

BugFix: queue() BadRequestException Handling on Cached Response
@benjchristensen benjchristensen merged commit 7220a9c into Netflix:master Sep 27, 2013
@benjchristensen benjchristensen deleted the queue-cached-future-exception branch September 27, 2013 03:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants