sdkerrors

package
v0.10.12 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotImplemented     = newTypedError("not_implemented")
	ErrAlreadyExists      = newTypedError("already_exists")
	ErrNotFound           = newTypedError("not_found")
	ErrConflict           = newTypedError("conflict")
	ErrUnauthorized       = newTypedError("unauthorized")
	ErrUnauthenticated    = newTypedError("unauthenticated")
	ErrUnknown            = NewRetryableErrorf("unknown")
	ErrFailedPrecondition = newTypedError("failed_precondition")
	ErrLimitExceeded      = NewRetryableErrorf("limit_exceeded")
	ErrProgram            = newTypedError("program_error")
)

Functions

func AsConnectError added in v0.3.0

func AsConnectError(err error) error

re-wrap sdk as connect error

func ErrorType added in v0.10.12

func ErrorType(err error) string

func IgnoreNotFoundErr

func IgnoreNotFoundErr[T any](in T, err error) (T, error)

func IsInvalidArgumentError added in v0.10.12

func IsInvalidArgumentError(err error) bool

func IsRetryableError added in v0.10.9

func IsRetryableError(err error) bool

func NewInvalidArgumentError added in v0.3.0

func NewInvalidArgumentError(f string, vs ...any) error

func NewRetryableError added in v0.10.2

func NewRetryableError(err error) error

func NewRetryableErrorf added in v0.10.12

func NewRetryableErrorf(f string, vs ...any) error

Types

type ErrInvalidArgument

type ErrInvalidArgument struct {
	Underlying error
}

func (ErrInvalidArgument) Error added in v0.3.0

func (e ErrInvalidArgument) Error() string

func (ErrInvalidArgument) ErrorType added in v0.10.12

func (e ErrInvalidArgument) ErrorType() string

func (ErrInvalidArgument) Unwrap added in v0.3.0

func (e ErrInvalidArgument) Unwrap() error

type RetryableError added in v0.10.2

type RetryableError struct {
	Err error
}

func (*RetryableError) Error added in v0.10.2

func (e *RetryableError) Error() string

func (*RetryableError) ErrorType added in v0.10.12

func (e *RetryableError) ErrorType() string

func (*RetryableError) Unwrap added in v0.10.2

func (e *RetryableError) Unwrap() error

type TypedError added in v0.10.12

type TypedError interface{ ErrorType() string }

Jump to

Keyboard shortcuts

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