Documentation ¶
Index ¶
- func ErrorCode(err error) string
- func HandleCredentialError(err error, ctx context.ProviderCallContext) error
- func HasDenialStatusCode(err error) bool
- func IsConflictError(err error) bool
- func IsForbiddenError(err error) bool
- func IsNotFoundError(err error) bool
- func MaybeInvalidateCredential(err error, ctx context.ProviderCallContext) bool
- func MaybeQuotaExceededError(err error) (error, bool)
- func SimpleError(err error) error
- func StatusCode(err error) int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleCredentialError ¶
func HandleCredentialError(err error, ctx context.ProviderCallContext) error
HandleCredentialError determines if given error relates to invalid credential. If it is, the credential is invalidated. Original error is returned untouched.
func HasDenialStatusCode ¶
HasDenialStatusCode returns true of the error has a status code meaning that the credential is invalid.
func IsConflictError ¶
IsConflictError returns true if the error is caused by a deployment Conflict.
func IsForbiddenError ¶
IsForbiddenError returns true if the error is caused by a forbidden error.
func IsNotFoundError ¶
IsNotFoundError returns true if the error is caused by a not found error.
func MaybeInvalidateCredential ¶
func MaybeInvalidateCredential(err error, ctx context.ProviderCallContext) bool
MaybeInvalidateCredential determines if given error is related to authentication/authorisation failures. If an error is related to an invalid credential, then this call will try to invalidate that credential as well.
func MaybeQuotaExceededError ¶
MaybeQuotaExceededError returns the relevant error message and true if the error is caused by a Quota Exceeded issue.
func SimpleError ¶
SimpleError returns an error with the "interesting" content from a ResponseError.
func StatusCode ¶
StatusCode returns the top level status code if the error is a ResponseError.
Types ¶
This section is empty.