diff --git a/k8s-operator/api-proxy/proxy.go b/k8s-operator/api-proxy/proxy.go index 2ea88efa2..d5a1d24fd 100644 --- a/k8s-operator/api-proxy/proxy.go +++ b/k8s-operator/api-proxy/proxy.go @@ -251,8 +251,7 @@ func (ap *APIServerProxy) sessionForProto(w http.ResponseWriter, r *http.Request return } - err = ap.recordRequestAsEvent(r, who) - if err != nil { + if err = ap.recordRequestAsEvent(r, who); err != nil { ap.log.Errorf("error recording Kubernetes API request: %v", err) return }