tfawserr

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 9, 2022 License: MPL-2.0 Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrCodeContains

func ErrCodeContains(err error, code string) bool

ErrCodeContains returns true if the error matches all these conditions:

  • err is of type awserr.Error
  • Error.Code() contains code

func ErrCodeEquals

func ErrCodeEquals(err error, codes ...string) bool

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

func ErrMessageContains(err error, code string, message string) bool

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

func ErrStatusCodeEquals(err error, statusCode int) bool

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL