errs

package
v0.19.1049 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2026 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithFrameworkError

func WithFrameworkError(err error, jobType string) error

func WithHandlerError

func WithHandlerError(err error, jobGroup models.AppRunnerJobGroup, jobStep string, jobType models.AppRunnerJobType) error

Types

type ErrType

type ErrType string
const (
	ErrTypeHandler   ErrType = "handler"
	ErrTypeFramework ErrType = "framework"
)

type Params

type Params struct {
	fx.In

	L        *zap.Logger `name:"system"`
	Settings *settings.Settings
	LC       fx.Lifecycle
}

type Recorder

type Recorder struct {
	// contains filtered or unexported fields
}

func NewRecorder

func NewRecorder(params Params) *Recorder

func (*Recorder) LifecycleHook

func (r *Recorder) LifecycleHook() fx.Hook

func (*Recorder) Record

func (r *Recorder) Record(msg string, err error)

Record is used to record errors that can not other wise be handled, such as when doing cleanup work, where we only care about what failed, but not the cleanup step.

func (*Recorder) Start

func (r *Recorder) Start() error

func (*Recorder) Stop

func (r *Recorder) Stop() error

func (*Recorder) ToSentry

func (r *Recorder) ToSentry(err error)

type RunnerError

type RunnerError struct {
	// contains filtered or unexported fields
}

RunnerError is the root of the runner's error taxonomy. It is used when no more specific error type is applicable.

func (*RunnerError) Cause

func (e *RunnerError) Cause() error

func (*RunnerError) Error

func (e *RunnerError) Error() string

func (*RunnerError) SafeFormatError

func (e *RunnerError) SafeFormatError(p errbase.Printer) error

func (*RunnerError) Unwrap

func (e *RunnerError) Unwrap() error

type RunnerFrameworkError

type RunnerFrameworkError struct {
	RunnerError
	JobType string
}

RunnerFrameworkError is a wrapper that indicates the contained error chain was emitted from some part of the runner framework itself, not a handler.

This error type is applied as a fallback during job processing if no other error type is applied.

TODO(sdboyer) having an error type like this doesn't do much until we make our errors properly network-portable

func (*RunnerFrameworkError) ErrorTags

func (e *RunnerFrameworkError) ErrorTags() map[string]string

func (*RunnerFrameworkError) Format

func (e *RunnerFrameworkError) Format(s fmt.State, verb rune)

func (*RunnerFrameworkError) Is

func (e *RunnerFrameworkError) Is(err error) bool

type RunnerHandlerError

type RunnerHandlerError struct {
	RunnerError
	JobGroup models.AppRunnerJobGroup
	JobType  models.AppRunnerJobType
	JobStep  string
}

RunnerHandlerError is a wrapper that indicates the contained error chain was emitted from a runner job handler.

Job handlers should NOT create this error directly - it is used by the runner framework itself to categorize errors. The type is exported only to enable sniffing

func (*RunnerHandlerError) ErrorTags

func (e *RunnerHandlerError) ErrorTags() map[string]string

func (*RunnerHandlerError) Format

func (e *RunnerHandlerError) Format(s fmt.State, verb rune)

func (*RunnerHandlerError) Is

func (e *RunnerHandlerError) Is(err error) bool

Jump to

Keyboard shortcuts

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