Registry / utility / crewjam-httperr

crewjam-httperr

JSON →
library0.2.0gogounverified

Package httperr implements an error object that speaks HTTP, allowing errors to carry HTTP status codes.

go get github.com/crewjam/httperr
INSTALL
IMPORT
SIG · CREWJAM-HTTPERR
C
crewjam-httperr
utilitygov0.2.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

httperr
github.com/crewjam/httperr

Create an HTTP error with a status code.

package main import ( "fmt" "net/http" "github.com/crewjam/httperr" ) func main() { err := httperr.New(http.StatusNotFound, "resource not found") fmt.Println(err.StatusCode()) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.2.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
13 hits · last 30 days
node
12
OpenAI (training)
1
Resources
crewjam-httperr — go get crewjam-httperr · libregistry