-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: use different error messages for namespace scoped token errors #3358
Conversation
return ctx, errUnauthenticated | ||
} | ||
} | ||
default: | ||
// if the the token has a namespace but the request does not then we should reject the request | ||
logger.Error("unauthenticated", | ||
zap.String("reason", "namespace is not allowed")) | ||
zap.String("reason", "namespace is requried when using namespace scoped token")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small typo:
zap.String("reason", "namespace is requried when using namespace scoped token")) | |
zap.String("reason", "namespace is required when using namespace scoped token")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Fixed and rebased with signed-off commits.
Signed-off-by: Yohta Kimura <38206553+rajyan@users.noreply.github.com>
Signed-off-by: Yohta Kimura <38206553+rajyan@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank for this @rajyan 🙏 Nice improvement.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3358 +/- ##
==========================================
+ Coverage 64.41% 64.44% +0.02%
==========================================
Files 172 172
Lines 13820 13820
==========================================
+ Hits 8902 8906 +4
+ Misses 4234 4232 -2
+ Partials 684 682 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@all-contributors please add @rajyan for code |
I've put up a pull request to add @rajyan! 🎉 |
Had some difficulty debugging the namespace scoped token error, so improved the error message reason.