Closed
Description
Vault returns status 400 with body {"errors":["permission denied"]}
if access token is incorrect or has insufficient permissions.
On receiving such status, vault-java-driver throws com.bettercloud.vault.VaultException: Expecting HTTP status 204 or 200, but instead receiving 400
.
Which is very confusing, because Vault documentation says that it means 400 - Invalid request, missing or invalid data. See the "validation" section for more details on the error response.
And it doesn't provide any more details.
vault-java-driver makes it hard to debug by not exposing response body.
I think that vault-java-driver should incorporate contents of errors
field in exception message.
Metadata
Metadata
Assignees
Labels
No labels