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

errors

package
v0.112.17 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alerter

type Alerter interface {
	SendAlert(ctx context.Context, err error, data map[string]interface{})
}

type DetailedError

type DetailedError struct {
	// a custom Hatchet error code
	// example: 1400
	Code uint `json:"code"`

	// a reason for this error
	Reason string `json:"reason"`

	// a description for this error
	// example: A descriptive error message
	Description string `json:"description"`

	// a link to the documentation for this error, if it exists
	// example: github.com/hatchet-dev/hatchet
	DocsLink string `json:"docs_link"`
}

func NewErrForbidden

func NewErrForbidden(err error) *DetailedError

func NewErrInternal

func NewErrInternal(err error) *DetailedError

func NewError

func NewError(code uint, reason, description, docsLink string) *DetailedError

func (DetailedError) Error

func (e DetailedError) Error() string

type NoOpAlerter

type NoOpAlerter struct{}

func (NoOpAlerter) SendAlert

func (s NoOpAlerter) SendAlert(ctx context.Context, err error, data map[string]interface{})

type Wrapped

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

func NewWrapped

func NewWrapped(a Alerter) *Wrapped

func (*Wrapped) WithData

func (w *Wrapped) WithData(data map[string]interface{})

func (*Wrapped) WrapErr

func (w *Wrapped) WrapErr(err error, data map[string]interface{}) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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