You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some AWS API errors return a fairly generic error code with a nested specific code. Currently we only check the top-level error code, and sometimes check the error message. AWS strongly discourages checking the error message, since it can change.
Using the current functions, this is how a specific error message can be checked for
The function should loop until the error code matches or err.OrigErr() returns nil. The awserr.Error return value will be the matched error or nil. The bool return value will be true if there is a match.
Description
Some AWS API errors return a fairly generic error code with a nested specific code. Currently we only check the top-level error code, and sometimes check the error message. AWS strongly discourages checking the error message, since it can change.
Using the current functions, this is how a specific error message can be checked for
Potential Library Implementation
The function should loop until the error code matches or
err.OrigErr()
returnsnil
. Theawserr.Error
return value will be the matched error ornil
. Thebool
return value will betrue
if there is a match.References
hashicorp/terraform-provider-aws#20082 (comment)
The text was updated successfully, but these errors were encountered: