-
Notifications
You must be signed in to change notification settings - Fork 136
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
Vault.with_retries does not return exception #68
Comments
Hi @assimovt In your example, no exception is being raise ("exception nil"). That means |
@sethvargo I actually have the vault stopped, so there is Exception raised that it can't connect. Here is the full output:
|
Hi @assimovt Can you please share the complete script you're running? It looks like the error is printed out there at the end? |
@sethvargo I don't have any script :) I just paste those lines into IRB session:
|
Hi @assimovt That seems to be behaving as expected to me? I'm confused what behavior you're expecting? The default retries are exhausted, so the exception is raised when the third attempt fails. |
I was expecting the exception to be printed out, as shown in the example in Readme.md: Vault.with_retries(Vault::HTTPConnectionError, Vault::HTTPError) do |attempt, e|
log "Received exception #{e} from Vault - attempt #{attempt}"
Vault.logical.read("secret/bacon")
end For me, it's always I see that it's only yielding here attempts, but not the actual exception? Or am I totally missing something here? 👓 😅 |
Thanks @sethvargo 👍 |
Not sure whether it's a bug, but I can't get the
Vault.with_retries
to return the exception:Output:
Ruby version:
ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin15]
Thoughts? Thanks!
The text was updated successfully, but these errors were encountered: