awsproviderlint: New Check: Prefer (*awserr.Error) instead of (*awserr.Error).Code() / (*awserr.Error).Message() in fmt.Errorf() #12987
Labels
linter
Pertains to changes to or issues with the various linters.
provider
Pertains to the provider itself, rather than any interaction with AWS.
technical-debt
Addresses areas of the codebase that need refactoring or redesign.
Community Note
Description
The AWS Go SDK provides a good String() implementation of errors including the ErrorCode, ErrorMessage, and request ID for troubleshooting with AWS Support. We should avoid trimming out useful bits from these error messages by referencing Code(), Message(), etc. and instead simplify to just referencing the error object itself.
Flagged Code
Passing Code
The text was updated successfully, but these errors were encountered: