Help us shape the future of Go! Take the 2026 Go Developer Survey

oops

package
v0.3.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppError

type AppError struct {
	Code Code   `json:"code"` // programmatic category
	Msg  string `json:"msg"`  // safe, user-presentable summary
	Err  error  `json:"err"`  // wrapped cause (can be nil)
}

AppError is an app defined and processed error object

func Err

func Err(code Code, msg string, cause error) *AppError

func (*AppError) Error

func (self *AppError) Error() string

func (*AppError) RootCause

func (self *AppError) RootCause() error

RootCause returns the deepest underlying error in the chain.

func (*AppError) Trail

func (self *AppError) Trail() string

Trail returns the full causal chain in a string format.

func (*AppError) TrailJSON

func (self *AppError) TrailJSON(pretty bool) string

TrailJSON returns the full causal chain as a string format.

func (*AppError) Unwrap

func (self *AppError) Unwrap() error

type Code

type Code int
const (
	OK Code = iota
	Internal
	FlowNotFound
	StepNotFound
	EmptyFlows
	StepAlreadyExists
	PromptError
	UserAborted
	OperationFailed
	ErrInvalidInput
	MissingRequiredFlag
	AssertionExpressionParsingFailure
	InvalidTarget
	FailedToGetCurrentDir
	// File operation errors
	FileReadError
	FileWriteError
	FileNotFound
	// Flow operation errors
	FlowExecutionFailed
	FlowAlreadyExists
	FlowRemovalError
	FlowUpdateError
	// Step operation errors
	StepUnmarshalError
	StepMarshalError
	StepExecutionFailed
	StepRequestFailed
	StepRequestBuildFailed
	StepRequestProcessingFailed
	StepResponseReadFailed
	StepRequestDeadlineExceeded
	StepRequestAssertionFailed
	StepRequestReturnedNotFound
	StepResponseEmpty
	StepRequestStatusMismatch
	StepRequestResponseAssertionFailed
	StepRequestResponseParsingFailure
	StepRequestResponseKeyNotFound
	StepRequestResponseKeyForbidden
	StepRequestResponseValueMismatch
	StepRequestResponseValueNotIterable
	StepRequestResponseValueLengthMismatch
	StepExportFailed
	BeforeRunFailed
	AfterRunFailed
	// Config errors
	ConfigFileNotFound
	ConfigFileExistsError
	ConfigCreationError
	ConfigMarshalError
	ConfigUnmarshalError
	ConfigInvalid
	// Network errors
	NetworkError
	ConnectionFailed
	TimeoutError
	// Validation errors
	ValidationError
	// HTTP errors
	HTTPError
	// JSON errors
	JSONParseError
	// Authentication errors
	AuthenticationError
	// JSONPath validation errors
	JSONPathValidationError
	// Exporting errors
	InvalidExportFormat
)

func (Code) IsUserError

func (code Code) IsUserError() bool

func (Code) String

func (code Code) String() string

Jump to

Keyboard shortcuts

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