errors

package
v0.3.0-alpha.9 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2024 License: MIT Imports: 2 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{})

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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