From de787a2948ed29e396032dd20f4bd9d6cd288bf3 Mon Sep 17 00:00:00 2001 From: Kevin Kreitner Date: Sun, 12 Jan 2025 17:35:32 +0100 Subject: [PATCH] Directly handle returned error Co-authored-by: Jan Larwig --- providers/cidaas.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/providers/cidaas.go b/providers/cidaas.go index 766f9e27..b0573429 100644 --- a/providers/cidaas.go +++ b/providers/cidaas.go @@ -73,9 +73,8 @@ func (p *CIDAASProvider) EnrichSession(ctx context.Context, s *sessions.SessionS } // Try to get missing emails or groups from a profileURL - err := p.enrichFromUserinfoEndpoint(ctx, s) - if err != nil { - logger.Errorf("Warning: Profile URL request failed: %v", err) + if err := p.enrichFromUserinfoEndpoint(ctx, s); err != nil { + logger.Errorf("Warning: Profile URL request failed: %w", err) } // If a mandatory email wasn't set, error at this point.