diff --git a/vault/request_handling.go b/vault/request_handling.go index ae2021e031..c3e7e2cd59 100644 --- a/vault/request_handling.go +++ b/vault/request_handling.go @@ -66,9 +66,9 @@ func (c *Core) HandleRequest(req *logical.Request) (resp *logical.Response, err } // Create an audit trail of the response - if err := c.auditBroker.LogResponse(auth, req, resp, err); err != nil { + if auditErr := c.auditBroker.LogResponse(auth, req, resp, err); auditErr != nil { c.logger.Printf("[ERR] core: failed to audit response (request path: %s): %v", - req.Path, err) + req.Path, auditErr) return nil, ErrInternalError }