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.
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
Watch the
htpasswd
file for changes and update thehtpasswdMap
#1701Watch the
htpasswd
file for changes and update thehtpasswdMap
#1701Changes from 3 commits
667d557
0b3ef55
0a159e2
1a0f52c
07f18ce
35f9ee8
3eba5d6
12b19bf
015fe20
100c623
37fa6e7
9e0c468
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Please wrap errors you are returning with additional context
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.
We already have the context in the
oauthproxy.go
file -> https://github.com/oauth2-proxy/oauth2-proxy/blob/master/oauthproxy.go#L114-L117.We just need the value of the error retrieved from
loadHTPasswdFile
orWatchFileForUpdates
.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.
Typically, if you add context at every level, it's easy to see the exact error paths. Else you have to dig into each function call within this function to see which child error came up
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.
Changed the error message from
oauthproxy.go
and added the context for load and watch.