You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was debugging an app where Vault was using a self signed certificate and the app did not have the root certificate used to sign the Vault certificate set into tls.Config for the http client.
This resulted in Client.Logical().Unwrap() returning nil, nil, which was a bit unexpected. There are numerous paths in client.Logical()'s methods that return nil, nil. For example, one of them for Unwrap() is here: https://github.com/hashicorp/vault/blob/master/api/logical.go#L147.
If there is no response body from the Vault server, would it make sense to return an error instead? It seems counter-intuitive to have to check the result of secret and err in secret, err := client.Logical().Unwrap() and other similar methods.
The text was updated successfully, but these errors were encountered:
If the original response is nil, which is a valid response from Vault (a 204 in HTTP-ese), tbe unwrapped response will reflect that. Working as designed!
I was debugging an app where Vault was using a self signed certificate and the app did not have the root certificate used to sign the Vault certificate set into
tls.Config
for the http client.This resulted in
Client.Logical().Unwrap()
returningnil, nil
, which was a bit unexpected. There are numerous paths inclient.Logical()
's methods that returnnil, nil
. For example, one of them forUnwrap()
is here: https://github.com/hashicorp/vault/blob/master/api/logical.go#L147.If there is no response body from the Vault server, would it make sense to return an error instead? It seems counter-intuitive to have to check the result of
secret
anderr
insecret, err := client.Logical().Unwrap()
and other similar methods.The text was updated successfully, but these errors were encountered: