errors

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: MIT Imports: 1 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsBadRequestError

func IsBadRequestError(err error) bool

IsBadRequestError checks if an error is related to a bad request being made. An error is considered to be a BadRequest error if it implements the following interface:

type badRequest interface {
	BadRequest() bool
}

and `BadRequest` returns true.

func IsClientError deprecated

func IsClientError(err error) bool

IsClientError checks if an error should be returned to the client for processing. An error is considered to be a client error if it implements the following interface:

type clientError interface {
	ClientError() bool
}

and `ClientError` returns true.

Deprecated: use ServiceError instead.

func IsConflictError

func IsConflictError(err error) bool

IsConflictError checks if an error is related to a resource conflict. An error is considered to be a Conflict error if it implements the following interface:

type conflict interface {
	Conflict() bool
}

and `Conflict` returns true.

func IsNotFoundError

func IsNotFoundError(err error) bool

IsNotFoundError checks if an error is related to a resource not being found. An error is considered to be a NotFound error if it implements the following interface:

type notFound interface {
	NotFound() bool
}

and `NotFound` returns true.

func IsServiceError added in v0.6.0

func IsServiceError(err error) bool

IsServiceError checks if an error should be returned to the client for processing. An error is considered to be a client error if it implements the following interface:

type serviceError interface {
	ServiceError() bool
}

and `ServiceError` returns true.

func IsValidationError

func IsValidationError(err error) bool

IsValidationError checks if an error is related to a resource or request being invalid. An error is considered to be a Validation error if it implements the following interface:

type validation interface {
	Validation() bool
}

and `Validation` returns true.

Types

This section is empty.

Jump to

Keyboard shortcuts

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