Fix nil panic in certain error conditions
This commit is contained in:
parent
6389a3cc31
commit
1fc837c22a
|
@ -232,7 +232,7 @@ func respondErrorCommon(w http.ResponseWriter, resp *logical.Response, err error
|
|||
}
|
||||
}
|
||||
|
||||
if resp != nil {
|
||||
if resp != nil && resp.IsError(){
|
||||
err = fmt.Errorf("%s", resp.Data["error"].(string))
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue