fail

package
v0.0.0-...-75f26f4 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CodeOK         = 0
	CodeValidation = 2
	CodeAuth       = 3
	CodeNetwork    = 4
	CodeAPI        = 5
)

Variables

This section is empty.

Functions

func ExitCode

func ExitCode(err error) int

func MapNetworkOrAPI

func MapNetworkOrAPI(err error) error

Types

type Error

type Error struct {
	Category string `json:"category"`
	Message  string `json:"message"`
	Action   string `json:"action,omitempty"`
	Details  string `json:"details,omitempty"`
}

func NewAPI

func NewAPI(msg, action, details string) *Error

func NewAuth

func NewAuth(msg, action string) *Error

func NewConfig

func NewConfig(msg, action string) *Error

func NewNetwork

func NewNetwork(msg, action string) *Error

func NewScope

func NewScope(msg, action string) *Error

func NewValidation

func NewValidation(msg, action string) *Error

func (*Error) Error

func (e *Error) Error() string

Jump to

Keyboard shortcuts

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