mirror of
https://github.com/hashicorp/vault.git
synced 2026-04-03 16:18:14 -04:00
Ensure response data not nil in IsError
This commit is contained in:
parent
4e2e38d7f4
commit
ea8a2c97cf
1 changed files with 1 additions and 1 deletions
|
|
@ -152,7 +152,7 @@ func (r *Response) CloneWarnings(other *Response) {
|
|||
|
||||
// IsError returns true if this response seems to indicate an error.
|
||||
func (r *Response) IsError() bool {
|
||||
return r != nil && len(r.Data) == 1 && r.Data["error"] != nil
|
||||
return r != nil && r.Data != nil && len(r.Data) == 1 && r.Data["error"] != nil
|
||||
}
|
||||
|
||||
func (r *Response) Error() error {
|
||||
|
|
|
|||
Loading…
Reference in a new issue