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

Add response body to exception for Auth failures #198

Merged

Conversation

mikegrass
Copy link
Contributor

Similar to #49, including the response body in the exception thrown for auth failures provides information that is helpful for debugging failed logins.

Add the response body to the VaultException thrown when an Auth method fails.

I've also fixed up a couple of issues that the build complained about:

> Task :javadoc
...
/Users/mgrass/src/vault-java-driver/src/main/java/com/bettercloud/vault/VaultConfig.java:216: error: @param name not found
     * @param prefixPathDepth integer number of path elements in the prefix path
              ^
...

> Task :javadoc FAILED
> Task :checkstyleMain FAILED
[ant:checkstyle] [ERROR] /Users/mgrass/src/vault-java-driver/src/main/java/com/bettercloud/vault/VaultConfig.java:212: Trailing spaces are not allowed. [RegexpSingleline]
[ant:checkstyle] [ERROR] /Users/mgrass/src/vault-java-driver/src/main/java/com/bettercloud/vault/api/Logical.java:6:8: Unused import - com.bettercloud.vault.json.JsonArray. [UnusedImports]
[ant:checkstyle] [ERROR] /Users/mgrass/src/vault-java-driver/src/main/java/com/bettercloud/vault/api/Logical.java:13:8: Unused import - java.util.ArrayList. [UnusedImports]
[ant:checkstyle] [ERROR] /Users/mgrass/src/vault-java-driver/src/main/java/com/bettercloud/vault/api/Logical.java:15:8: Unused import - java.util.List. [UnusedImports]

Unfortunately, it looks like compilation of tests was broken by #189; based on #189 (comment) it sounds like @steve-perkins has a fix on the way for the broken tests, so I haven't touched those.

mikegrass and others added 3 commits December 5, 2019 15:04
Similar to BetterCloud#49,
including the response body in the exception thrown for auth failures
provides information that is helpful for debugging failed logins.

Add the response body to the VaultException thrown when an Auth
method fails.
@steve-perkins steve-perkins merged commit fef74b8 into BetterCloud:master Dec 11, 2019
@steve-perkins
Copy link
Contributor

Thanks!

@mikegrass mikegrass deleted the login-error-response-bodies branch December 12, 2019 04:56
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