feat: do not capture warning errors
Cadoles/bouncer/pipeline/head This commit looks good Details

This commit is contained in:
wpetit 2024-10-11 14:18:52 +02:00
parent 11375e546f
commit 8983a44d9e
2 changed files with 2 additions and 2 deletions

View File

@ -48,7 +48,7 @@ func (c *Client) Provider() *oidc.Provider {
func (c *Client) Authenticate(w http.ResponseWriter, r *http.Request, sess *sessions.Session, postLoginRedirectURL string) (*oidc.IDToken, error) { func (c *Client) Authenticate(w http.ResponseWriter, r *http.Request, sess *sessions.Session, postLoginRedirectURL string) (*oidc.IDToken, error) {
idToken, err := c.getIDToken(r, sess) idToken, err := c.getIDToken(r, sess)
if err != nil { if err != nil {
logger.Warn(r.Context(), "could not retrieve idtoken", logger.CapturedE(errors.WithStack(err))) logger.Warn(r.Context(), "could not retrieve idtoken", logger.E(errors.WithStack(err)))
c.login(w, r, sess, postLoginRedirectURL) c.login(w, r, sess, postLoginRedirectURL)

View File

@ -234,7 +234,7 @@ func (s *Server) handleError(w http.ResponseWriter, r *http.Request, status int,
err = errors.WithStack(err) err = errors.WithStack(err)
if errors.Is(err, context.Canceled) { if errors.Is(err, context.Canceled) {
logger.Warn(r.Context(), err.Error(), logger.CapturedE(err)) logger.Warn(r.Context(), err.Error(), logger.E(err))
} else { } else {
logger.Error(r.Context(), err.Error(), logger.CapturedE(err)) logger.Error(r.Context(), err.Error(), logger.CapturedE(err))
} }