mirror of
https://github.com/hashicorp/vault.git
synced 2026-06-09 00:33:28 -04:00
ensure response is not nil before sanitizing (#27923)
Co-authored-by: akshya96 <87045294+akshya96@users.noreply.github.com>
This commit is contained in:
parent
e31d1a8b1e
commit
cbc06c0856
1 changed files with 4 additions and 0 deletions
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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue