httperror

package
v4.75.3 Latest Latest
Warning

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

Go to latest
Published: May 4, 2024 License: MIT Imports: 5 Imported by: 14

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BadRequest

func BadRequest(ctx context.Context, w http.ResponseWriter, err error)

func ErrorStatus

func ErrorStatus(err error) (status int, message string)

func Forbidden

func Forbidden(ctx context.Context, w http.ResponseWriter)

func FromResponse added in v4.46.3

func FromResponse(resp *http.Response, err error) error

func FromStatus added in v4.46.2

func FromStatus(status int, err error) error

func HandleError

func HandleError(ctx context.Context, w http.ResponseWriter, err error) bool

func InternalServerError

func InternalServerError(ctx context.Context, w http.ResponseWriter, err error)

func Log added in v4.71.1

func Log(ctx context.Context, err error, status int, message string)

func NotFound

func NotFound(ctx context.Context, w http.ResponseWriter)

func Unauthorized

func Unauthorized(ctx context.Context, w http.ResponseWriter, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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