errors

package
v0.48.3-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2024 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 added in v0.15.2

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

func NewWrapped added in v0.15.2

func NewWrapped(a Alerter) *Wrapped

func (*Wrapped) WithData added in v0.15.2

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

func (*Wrapped) WrapErr added in v0.15.2

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