Documentation
¶
Overview ¶
Package errtypes owns engine error values without activity or workflow dependencies. Applications use the aliases and constructors exposed by package engine.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrCanceled = context.Canceled
ErrCanceled marks engine cancellation. It shares context.Canceled's identity so existing context cancellation checks and exact-leaf classification keep working. Engines must surface this marker for canceled activities, workflows and timers.
Functions ¶
func IsCanceled ¶
IsCanceled reports whether err carries the engine cancellation marker. Mixed error graphs require the runtime's exact-leaf classifier to decide run status.
Types ¶
type ApplicationError ¶
type ApplicationError struct {
Type string
Message string
NonRetryable bool
Details any
Cause error
}
ApplicationError carries a portable activity or workflow failure. Every engine must stop retrying an activity that returns an ApplicationError with NonRetryable set. Activity and workflow failures surfaced to workflow code must carry these engine types so errors.As can inspect them in the runtime. Details is a single serializable value; Cause retains the underlying failure.
func NewApplicationError ¶
func NewApplicationError(message, errorType string, details any, cause error) *ApplicationError
NewApplicationError constructs a retryable application failure.
func NewNonRetryableApplicationError ¶
func NewNonRetryableApplicationError(message, errorType string, details any, cause error) *ApplicationError
NewNonRetryableApplicationError constructs a failure that must not be retried.
func (*ApplicationError) Error ¶
func (e *ApplicationError) Error() string
Error returns the application failure message.
func (*ApplicationError) Unwrap ¶
func (e *ApplicationError) Unwrap() error
Unwrap returns the underlying application failure.
type TimeoutError ¶
type TimeoutError struct {
Cause error
}
TimeoutError marks an engine execution timeout and retains its underlying cause. Engines must surface this type to workflow code for execution timeouts.
func (*TimeoutError) Error ¶
func (e *TimeoutError) Error() string
Error returns the underlying timeout message, or a stable default.
func (*TimeoutError) Unwrap ¶
func (e *TimeoutError) Unwrap() error
Unwrap returns the underlying timeout failure.