mirror of
https://github.com/hashicorp/vault.git
synced 2026-05-05 12:26:34 +02: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
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…
x
Reference in New Issue
Block a user