errors

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeErrorToHttpErrorStatus

func DecodeErrorToHttpErrorStatus(err error) int

Types

type ErrorType

type ErrorType uint32
const (
	NoType ErrorType = iota

	// 4xx
	BadRequest
	Unauthorized
	PaymentRequired
	Forbidden
	NotFound
	MethodNotAllowed
	NotAcceptable
	ProxyAuthenticationRequired
	RequestTimeout
	Conflict
	LengthRequired
	PreconditionFailed
	ContentTooLarge
	URITooLong
	UnsupportedMediaType
	RangeNotSatisfiable
	FailedDependency
	TooEarly
	TooManyRequests
	UnavailableForLegalReasons

	// 5xx
	InternalServerError
	NotImplemented
	BadGateway
	ServiceUnavailable
	GatewayTimeout
	HTTPVersionNotSupported
	VariantAlsoNegotiates
	InsufficientStorage
	LoopDetected
	NotExtended
	NetworkAuthenticationRequired
)

func (ErrorType) New

func (errType ErrorType) New(message string) error

defined methods on ErrorType

func (ErrorType) Wrap

func (errType ErrorType) Wrap(err error, message string) error

Jump to

Keyboard shortcuts

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