util

package
v0.0.0-...-4b21e95 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2022 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Error

func Error(r *http.Request, w http.ResponseWriter, originalError error)

Error creates a standardized error response

func ErrorWithCode

func ErrorWithCode(r *http.Request, w http.ResponseWriter, originalError error, statusCode int)

ErrorWithCode creates a standardized error response with a status code

func ResponseCodeFromError

func ResponseCodeFromError(err error) int

ResponseCodeFromError resolves a status code from an error

Types

This section is empty.

Jump to

Keyboard shortcuts

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