Skip to content

Commit

Permalink
fix panic when listing nil resp (#5886)
Browse files Browse the repository at this point in the history
  • Loading branch information
briankassouf committed Dec 3, 2018
1 parent dcb9dcb commit e9b8dff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion logical/response_util.go
Expand Up @@ -23,7 +23,7 @@ func RespondErrorCommon(req *Request, resp *Response, err error) (int, error) {

// Basically: if we have empty "keys" or no keys at all, 404. This
// provides consistency with GET.
case req.Operation == ListOperation && resp.WrapInfo == nil:
case req.Operation == ListOperation && (resp == nil || resp.WrapInfo == nil):
if resp == nil {
return http.StatusNotFound, nil
}
Expand Down

0 comments on commit e9b8dff

Please sign in to comment.