errfmt

package
v0.0.0-...-53658a8 Latest Latest
Warning

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

Go to latest
Published: May 6, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExitCode

func ExitCode(err error) int

ExitCode returns the stable CLI process exit code for err.

func Format

func Format(err error) string

Format returns a human-facing single-line message for err.

Types

type APIError

type APIError struct {
	StatusCode int
	Code       string
	Detail     string
	RequestID  string
}

APIError represents a structured error response from the Disbug API.

func (APIError) Error

func (e APIError) Error() string

type NetworkError

type NetworkError struct {
	URL   string
	Cause error
}

NetworkError represents a failure to reach the Disbug API.

func (NetworkError) Error

func (e NetworkError) Error() string

func (NetworkError) Unwrap

func (e NetworkError) Unwrap() error

type NoToken

type NoToken struct{}

NoToken means no usable Disbug token was available.

func (NoToken) Error

func (e NoToken) Error() string

type UsageError

type UsageError struct {
	Message string
}

UsageError represents invalid CLI usage.

func (UsageError) Error

func (e UsageError) Error() string

type UserFacingError

type UserFacingError struct {
	Message string
	Cause   error
}

UserFacingError carries a message that should be shown to users unchanged.

func (UserFacingError) Error

func (e UserFacingError) Error() string

func (UserFacingError) Unwrap

func (e UserFacingError) Unwrap() error

Jump to

Keyboard shortcuts

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