aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/hashicorp/vault/api/response.go
diff options
context:
space:
mode:
authorNiall Sheridan <nsheridan@gmail.com>2017-10-18 13:15:14 +0100
committerNiall Sheridan <niall@intercom.io>2017-10-18 13:25:46 +0100
commit7b320119ba532fd409ec7dade7ad02011c309599 (patch)
treea39860f35b55e6cc499f8f5bfa969138c5dd6b73 /vendor/github.com/hashicorp/vault/api/response.go
parent7c99874c7a3e7a89716f3ee0cdf696532e35ae35 (diff)
Update dependencies
Diffstat (limited to 'vendor/github.com/hashicorp/vault/api/response.go')
-rw-r--r--vendor/github.com/hashicorp/vault/api/response.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/vendor/github.com/hashicorp/vault/api/response.go b/vendor/github.com/hashicorp/vault/api/response.go
index 7c8ac9f..05502e1 100644
--- a/vendor/github.com/hashicorp/vault/api/response.go
+++ b/vendor/github.com/hashicorp/vault/api/response.go
@@ -25,8 +25,9 @@ func (r *Response) DecodeJSON(out interface{}) error {
// this will fully consume the response body, but will not close it. The
// body must still be closed manually.
func (r *Response) Error() error {
- // 200 to 399 are okay status codes
- if r.StatusCode >= 200 && r.StatusCode < 400 {
+ // 200 to 399 are okay status codes. 429 is the code for health status of
+ // standby nodes.
+ if (r.StatusCode >= 200 && r.StatusCode < 400) || r.StatusCode == 429 {
return nil
}