errors

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AuthFailure             = "AuthFailure"
	GroupNotFound           = "InvalidGroup.NotFound"
	PermissionNotFound      = "InvalidPermission.NotFound"
	ResourceNotFound        = "InvalidResourceID.NotFound"
	InvalidInstanceID       = "InvalidInstanceID.NotFound"
	InvalidParameter        = "Client.InvalidParameterNotFound.Instance"
	SecurityGroupProcessing = "Server.ResourceIncorrectState.SecurityGroup.Processing"
)

Variables

This section is empty.

Functions

func Code

func Code(err error) (string, bool)

func IsConflict

func IsConflict(err error) bool

IsConflict returns true if the error was created by NewConflict.

func IsFailedDependency

func IsFailedDependency(err error) bool

IsFailedDependency checks if the error is pf http.StatusFailedDependency

func IsIgnorableSecurityGroupError

func IsIgnorableSecurityGroupError(err error) error

IsIgnorableSecurityGroupError checks for errors in SG that can be ignored and then return nil.

func IsInvalidNotFoundError

func IsInvalidNotFoundError(err error) bool

IsInvalidNotFoundError tests for common aws not found errors

func IsNotFound

func IsNotFound(err error) bool

IsNotFound returns true if the error was created by NewNotFound.

func IsSDKError

func IsSDKError(err error) (ok bool)

IsSDKError returns true if the error is of type awserr.Error.

func Message

func Message(err error) string

func NewConflict

func NewConflict(err error) error

NewConflict returns a new error which indicates that the request cannot be processed due to a conflict.

func NewFailedDependency

func NewFailedDependency(err error) error

NewFailedDependency returns a new error which indicates that a dependency failure status

func NewNotFound

func NewNotFound(err error) error

NewNotFound returns a new error which indicates that the resource of the kind and the name was not found.

func ReasonForError

func ReasonForError(err error) int

ReasonForError returns the HTTP status for a particular error.

Types

type ServerError

type ServerError struct {
	Code int
	// contains filtered or unexported fields
}

func (*ServerError) Error

func (e *ServerError) Error() string

Error implements the Error interface.

Jump to

Keyboard shortcuts

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