httperr

package
v2.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BadRequest

func BadRequest(err error) error

func Forbidden

func Forbidden(err error) error

func Found added in v2.1.0

func Found(location string) error

func InternalServerError

func InternalServerError(err error) error

func New

func New(err error, status int) error

func NotFound

func NotFound(err error) error

func TooManyRequests

func TooManyRequests(err error) error

func Unauthorized

func Unauthorized(err error) error

Types

type Error

type Error struct {
	Err      error
	Status   int
	Location string
}

func (*Error) As

func (e *Error) As(target any) bool

func (*Error) Error

func (e *Error) Error() string

func (*Error) Is

func (e *Error) Is(target error) bool

Jump to

Keyboard shortcuts

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