amperity / vault-clj

Clojure client for Hashicorp's Vault secret management system.
Other
70 stars 17 forks source link

It should be possible to diagnose server side failures from the HttpClient #30

Closed sflanker closed 2 years ago

sflanker commented 5 years ago

Right now if an HTTP request to write a secret results in a non-200 response, all the caller gets back is a boolean false (https://github.com/amperity/vault-clj/blob/develop/src/vault/client/http.clj#L578). This is not helpful. The vault API supposedly gives you more information than this: https://www.vaultproject.io/api/overview.html#error-response

When making a call to write-secret! it should be possible to determine the actual status code returned in the event of failure, and the salient information from the body of the response.

greglook commented 2 years ago

In 2.x this now throws an ExceptionInfo with details in the message and data map.