Authn: Ignore context.Canceled errors when logging auth errors (#85707)
Ignore context.Canceled errors when logging auth errors
This commit is contained in:
1 parent
d7ad7c6169
commit
46ee87a0fc
1 file changed
+4
@@ -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
|
||||
|
||||
Reference in new issue
Block a user