-
Notifications
You must be signed in to change notification settings - Fork 992
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
golang/oauth2/stsexchange: error handling enhancement proposal #740
Comments
Would you mind raising an issue on https://github.com/googleapis/google-cloud-go instead. This package |
Sure, I can bring this up, but I would like to point out that in my case I use both Can the attached MR still be considered? |
Your PR and issue mention the google sub-directory that is used for Google clients. This package will soon be deprecated in favor of the one I liked above. We don't plan on adding any more features to this google package at this time. |
Hello!
The standard implementation of
client_credentials
grant_type uses aRetrieveError
, which is really useful because it provides the raw response body and error code.oauth2/token.go
Lines 184 to 198 in 3e64809
As I noticed, the
stsexchange
implementation wraps the raw error message, which makes it difficult to properly handle custom errors from different OIDC providers.oauth2/google/internal/stsexchange/sts_exchange.go
Lines 89 to 91 in 3e64809
It would be great if
stsexchange
wrapped errors the same wayclient_credentials
do.The text was updated successfully, but these errors were encountered: