mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-10-30 02:02:43 +00:00
ensure response is not nil before sanitizing (#27923)
Co-authored-by: akshya96 <87045294+akshya96@users.noreply.github.com>
This commit is contained in:
4
command/agentproxyshared/cache/handler.go
vendored
4
command/agentproxyshared/cache/handler.go
vendored
@@ -85,6 +85,10 @@ func ProxyHandler(ctx context.Context, logger hclog.Logger, proxier Proxier, inm
|
||||
logical.RespondError(w, http.StatusInternalServerError, fmt.Errorf("failed to get the response: %w", err))
|
||||
}
|
||||
return
|
||||
} else if resp == nil {
|
||||
metrics.IncrCounter([]string{"agent", "proxy", "error"}, 1)
|
||||
logical.RespondError(w, http.StatusInternalServerError, fmt.Errorf("failed to get the response: %w", err))
|
||||
return
|
||||
}
|
||||
|
||||
err = sanitizeAutoAuthTokenResponse(ctx, logger, inmemSink, req, resp)
|
||||
|
||||
Reference in New Issue
Block a user