errorsx

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExitOK         = 0
	ExitGeneral    = 1 // generic / unknown error
	ExitAuth       = 2 // authentication failure (401/403)
	ExitNotFound   = 3 // resource not found (404)
	ExitConflict   = 4 // conflict (409)
	ExitBadRequest = 5 // invalid input / bad request (400)
	ExitTimeout    = 6 // operation timed out
	ExitCancelled  = 7 // user cancelled (e.g. declined confirmation)
)

Exit codes for structured error handling in scripts and agents.

Variables

This section is empty.

Functions

func ExitCodeFromError added in v0.7.0

func ExitCodeFromError(err error) int

ExitCodeFromError returns an appropriate exit code for the given error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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