-
Notifications
You must be signed in to change notification settings - Fork 626
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
CredentialsProvider errors cannot be unwrapped #2400
Comments
kgeckhart
added
bug
This issue is a bug.
needs-triage
This issue or PR still needs to be triaged.
labels
Dec 1, 2023
lucix-aws
added
p1
This is a high priority issue
and removed
needs-triage
This issue or PR still needs to be triaged.
labels
Dec 1, 2023
🤦 This is a silly mistake on my part. Thanks for the report. Fixing immediately. |
This was referenced Dec 1, 2023
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
As of aws-sdk-go-v2 v1.23.0 any errors from the CredentialsProvider are being stringified instead of being wrapped. This breaks any code which might have been trying to unwrap these errors to an
smithy.APIError
for error handling purposes.The docs about error handling mention all API errors should implement
smithy.APIError
https://aws.github.io/aws-sdk-go-v2/docs/handling-errors/#api-error-responses but due being stringified this no longer works.Expected Behavior
Using the reproduction code on versions < 1.23 the error can be unwrapped to
smithy.APIError
Current Behavior
Using the reproduction code on versions >= 1.23 the error can no longer be unwrapped to
smithy.APIError
Reproduction Steps
Possible Solution
#2364 introduced some usages of
fmt.Errorf(...: %v, err)
which I think could be using%w
to allow for wrapped errors.%w
as wellAdditional Information/Context
No response
AWS Go SDK V2 Module Versions Used
aws-sdk-go-v2 v1.23.0 and above
Compiler and Version used
n/a
Operating System and version
n/a
The text was updated successfully, but these errors were encountered: