Authn: Ignore context.Canceled errors when logging auth errors (#85707)

Ignore context.Canceled errors when logging auth errors
pull/85659/head^2
Karl Persson 1 year ago committed by GitHub
parent d7ad7c6169
commit 46ee87a0fc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      pkg/services/authn/authnimpl/service.go

@ -320,6 +320,10 @@ func (s *Service) SyncIdentity(ctx context.Context, identity *authn.Identity) er
}
func (s *Service) errorLogFunc(ctx context.Context, err error) func(msg string, ctx ...any) {
if errors.Is(err, context.Canceled) {
return func(msg string, ctx ...any) {}
}
l := s.log.FromContext(ctx)
var grfErr errutil.Error

Loading…
Cancel
Save