errors

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRetryAtTime

func GetRetryAtTime(err error) *time.Time

GetRetryAtTime returns the time from a retryAtError, or nil.

func IsNoRetryError

func IsNoRetryError(err error) bool

IsNoRetryError returns whether an error is a NoRetryError

func IsStepError added in v0.6.0

func IsStepError(err error) bool

func NoRetryError

func NoRetryError(err error) error

NoRetryError wraps an error, preventing retries in the SDK. This permanently fails a step and function.

func RetryAtError

func RetryAtError(err error, at time.Time) error

RetryAtError allows you to specify the time at which the next retry should occur. This wraps your error, leaving the original cause and error message available.

Types

type StepError added in v0.6.0

type StepError struct {
	Name    string `json:"name"`
	Message string `json:"message"`
	// Data is the data from state.UserError, used to store
	// the resulting value when step errors occur with an additional
	// response type.
	Data json.RawMessage `json:"data,omitempty"`
}

StepError is an error returned when a step permanently fails

func (StepError) Error added in v0.6.0

func (e StepError) Error() string

func (StepError) Is added in v0.6.0

func (e StepError) Is(err error) bool

Jump to

Keyboard shortcuts

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