httperr

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MsgInternal        = "Internal server error"
	MsgBadContentType  = "Bad content-type provided. Only application/reports+json, application/csp-report & application/json is acceptable."
	MsgInvalidBody     = "Invalid request body"
	MsgTooManyRequests = "Too many requests"
	MsgRequestTooLarge = "Request body too large"
)

Variables

This section is empty.

Functions

func BadRequest

func BadRequest(w http.ResponseWriter, msg string)

func Internal

func Internal(w http.ResponseWriter)

func RequestTooLarge

func RequestTooLarge(w http.ResponseWriter)

func TooManyRequests

func TooManyRequests(w http.ResponseWriter)

func WriteError

func WriteError(w http.ResponseWriter, status int, msg string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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