Commit e0e8f51
committed
fix: panic in CreateOrGetUser when user has no emails
response.Emails[0].Value in the slog.Warn call would panic if the
user retrieved from AWS SSO had no emails (e.g. data inconsistency).
Replace with (*User)(response).GetPrimaryEmailAddress() which already
exists on the User type and safely returns an empty string when no
primary email is found.1 parent 595d357 commit e0e8f51
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
340 | 340 | | |
341 | 341 | | |
342 | 342 | | |
343 | | - | |
| 343 | + | |
344 | 344 | | |
345 | 345 | | |
346 | 346 | | |
| |||
0 commit comments