Directly handle returned error

Co-authored-by: Jan Larwig <jan@larwig.com>
This commit is contained in:
Kevin Kreitner 2025-01-12 17:35:32 +01:00 committed by Jan Larwig
parent 919d491cdc
commit de787a2948
No known key found for this signature in database
GPG Key ID: C2172BFA220A037A
1 changed files with 2 additions and 3 deletions

View File

@ -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.