Skip to content

Commit

Permalink
Allow for response errors to be passed back from a plugin (#3412)
Browse files Browse the repository at this point in the history
* Allow for response errors to be passed back from a plugin

* Fix issue with checking plugin.BasicError == nil
  • Loading branch information
briankassouf committed Oct 6, 2017
1 parent 2758dbc commit 9689e88
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion logical/plugin/backend_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ func (b *backendPluginClient) HandleRequest(req *logical.Request) (*logical.Resp
if reply.Error.Error() == logical.ErrUnsupportedOperation.Error() {
return nil, logical.ErrUnsupportedOperation
}
return nil, reply.Error

return reply.Response, reply.Error
}

return reply.Response, nil
Expand Down

0 comments on commit 9689e88

Please sign in to comment.