{{ message }}
Adding the ability to not treat 4xx response codes as errors that sho…#176
Merged
Conversation
…uld be retried and converted into exceptions
Contributor
Author
|
I absolutely agree - I was trying to avoid changing the default behavior, but since it sounds like we are on the same page I'll rev this PR to make it the default behavior. I'm traveling through Monday so it will take me a few days to turn around. |
Contributor
|
No problem at all. Thanks so much, and have a great weekend. |
Author
|
I've updated the PR to make this the default behavior, and added a new test to the VaultTests suite. |
Contributor
|
Awesome, thank you! |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Adds support for not treating 4xx status coded from vaults as errors for reads/writes, and allows them to be passed back without retries or being converted to VaultExceptions.
Use Case:
We have a spring app with a custom property resolver that can read properties from various sources, and want to add Vault as a new source. If a property does not exist in vault, it should read it from the next source. With the current version of vault-java-driver if the property is not in Vault it will retry the configured number of times, waiting between each retry, which significantly slows down the app startup. This PR allows us to turn that off and get an immediate "no such value" from Vault.
If you would prefer, I could modify this to still throw an exception but just turn off the retry logic.