-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
expose a constructor func for awserr.Error types #254
Comments
Thanks for posting this @sclasen. An additional place this pain point is returning awserr.Error compatible error when using custom credentials providers. If we limit to the Code/Message/OrigErr fields then the New(...) constructor could be exposed via aws/awserr package. Though the awserr.RequestFailure interface would still present a pain point for the same reasons as awserr.Error. A awserr.NewRequestFailure(...) Would also make sense. |
👍 |
Adds two new constructors for the awserr Error types. Can also be used for building awserr.Error for testing. - awserr.New() returns an Error object described by code, message, and origErr. If origErr satisfies the Error interface it will not be wrapped within a new Error object, and will instead be returned. - awserr.NewRequestFailure() returns a new request error wrapper for the given Error provided. Fixes: #254
Thanks for suggesting this feature @sclasen. Now that the change has been pushed I'm going to go ahead and close this issue. Please let open an issue, if you have any further feedback, or issues. |
Updates the v2 SDK to use the latest go-jmespath. Fix aws#247
Services --- * Synced the V2 SDK with latests AWS service API definitions. SDK Enhancements --- * deps: Update SDK to latest go-jmespath ([aws#254](aws/aws-sdk-go-v2#254)) SDK Bugs --- * `internal/ini`: Fix bug on trimming rhs spaces closes ([aws#260](aws/aws-sdk-go-v2#260)) * Fixes a bug trimming RHS spaces not being read correctly from the ini file. * Fix [aws#259](aws/aws-sdk-go-v2#259)
internal.apierr.New(...)
should probably have a non-internal counterpart. otherwise it is quite painful to create errors to test error handling withThe text was updated successfully, but these errors were encountered: