fix: improve GitHub auth error message for security requirements#5331
Merged
markphelps merged 2 commits intov2from Jan 30, 2026
Merged
fix: improve GitHub auth error message for security requirements#5331markphelps merged 2 commits intov2from
markphelps merged 2 commits intov2from
Conversation
Replace generic "request was not authenticated" error message with more specific "account does not satisfy the security requirements" when users fail to meet organization/team restrictions in GitHub authentication. Signed-off-by: Roman Dmytrenko <rdmytrenko@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v2 #5331 +/- ##
==========================================
+ Coverage 60.53% 60.54% +0.01%
==========================================
Files 138 138
Lines 13505 13509 +4
==========================================
+ Hits 8175 8179 +4
Misses 4641 4641
Partials 689 689
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
markphelps
reviewed
Jan 29, 2026
| } | ||
|
|
||
| return errors.ErrUnauthenticatedf("request was not authenticated") | ||
| return errors.ErrUnauthenticatedf("account does not satisfy the security requirements") |
Collaborator
There was a problem hiding this comment.
im wondering if we should be more specific and return an error for:
- if they arent in the specified organizations list (dont name the orgs though)
- if they arent in the specified teams if they are in the org (same, no names)
i think this would be most helpful without leaking anything ? wdyt?
Signed-off-by: Roman Dmytrenko <rdmytrenko@gmail.com>
erka
added a commit
that referenced
this pull request
Feb 4, 2026
* fix: improve GitHub auth error message for security requirements Replace generic "request was not authenticated" error message with more specific "account does not satisfy the security requirements" when users fail to meet organization/team restrictions in GitHub authentication. Signed-off-by: Roman Dmytrenko <rdmytrenko@gmail.com> * address PR feedback Signed-off-by: Roman Dmytrenko <rdmytrenko@gmail.com> --------- Signed-off-by: Roman Dmytrenko <rdmytrenko@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace generic "request was not authenticated" error message with more
specific "account does not satisfy the security requirements" when users
fail to meet organization/team restrictions in GitHub authentication.