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

Pass any 429's through without triggering any Hystrix events #165

Merged
merged 1 commit into from
Dec 7, 2015
Merged

Pass any 429's through without triggering any Hystrix events #165

merged 1 commit into from
Dec 7, 2015

Conversation

ajordens
Copy link
Contributor

@ajordens ajordens commented Dec 7, 2015

  • Will be extracted out into kork-hystrix

@ajordens
Copy link
Contributor Author

ajordens commented Dec 7, 2015

I expect to pull this out into kork-hystrix but would like to see it working first within gate.

PTAL @spinnaker/netflix-reviewers

try {
return work()
} catch (RetrofitError error) {
throw UpstreamBadRequest.classifyError(error, [HttpStatus.TOO_MANY_REQUESTS.value()])
Copy link
Contributor

Choose a reason for hiding this comment

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

why not just propagate any 4xx back to the caller since we generally don't have any smarts in this layer?

if I submit malformed JSON or ask for a missing resource that should come back out

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Was going to do that when I moved it to kork-hystrix but I've gone ahead and done it here now.

throw UpstreamBadRequest.classifyError(error, HttpStatus.values().findAll { it.is4xxClientError() }*.value() as Collection<Integer>)

- Will be extracted out into kork-hystrix
@ajordens
Copy link
Contributor Author

ajordens commented Dec 7, 2015

PR updated to propagate all 4xx (and not just 429)

ajordens added a commit that referenced this pull request Dec 7, 2015
Pass any 429's through without triggering any Hystrix events
@ajordens ajordens merged commit 7022127 into spinnaker:master Dec 7, 2015
@ajordens ajordens deleted the propagate-429 branch December 7, 2015 19:01
abhinaybyrisetty referenced this pull request in OpsMx/gate Mar 18, 2021
@spinnakerbot spinnakerbot mentioned this pull request Jun 28, 2021
@spinnakerbot spinnakerbot mentioned this pull request Jul 6, 2021
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.

2 participants