Documentation ¶
Index ¶
- func ErrCodeContains(err error, code string) bool
- func ErrCodeEquals(err error, codes ...string) bool
- func ErrMessageAndOrigErrContain(err error, code string, message string, origErrMessage string) bool
- func ErrMessageContains(err error, code string, message string) bool
- func ErrStatusCodeEquals(err error, statusCode int) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrCodeContains ¶
ErrCodeContains returns true if the error matches all these conditions:
- err is of type awserr.Error
- Error.Code() contains code
func ErrCodeEquals ¶
ErrCodeEquals returns true if the error matches all these conditions:
- err is of type awserr.Error
- Error.Code() equals one of the passed codes
func ErrMessageAndOrigErrContain ¶
func ErrMessageAndOrigErrContain(err error, code string, message string, origErrMessage string) bool
ErrMessageAndOrigErrContain returns true if the error matches all these conditions:
- err is of type awserr.Error
- Error.Code() matches code
- Error.Message() contains message
- Error.OrigErr() contains origErrMessage
func ErrMessageContains ¶
ErrMessageContains returns true if the error matches all these conditions:
- err is of type awserr.Error
- Error.Code() equals code
- Error.Message() contains message
func ErrStatusCodeEquals ¶
ErrStatusCodeEquals returns true if the error matches all these conditions:
- err is of type awserr.RequestFailure
- RequestFailure.StatusCode() equals statusCode
It is always preferable to use ErrMessageContains() except in older APIs (e.g. S3) that sometimes only respond with status codes.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.