httperror

package
v4.88.1 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: MIT Imports: 6 Imported by: 19 modules, 23 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 CanBeIgnored added in v4.80.3

func CanBeIgnored(err error) bool

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, err error)

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