Documentation
¶
Overview ¶
Package apperrors defines the cross-cutting sentinel errors; named so callers can also import "errors".
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func Fatal ¶
Fatal wraps err so errors.Is(err, ErrFatal) holds. Event handlers return it for permanent failures the bus middleware should dead-letter immediately.
Types ¶
type Coded ¶
Coded is an error carrying a stable machine code adapters report instead of the sentinel's generic one.
type InUseError ¶
type InUseError struct {
// Thing is what was asked to go, as it reads in a sentence, such as `tunnel "edge"`.
Thing string
// Users are what depend on it, each as it reads in a list, such as "app.example.com".
Users []string
// Fix says what to do first, such as "edit or remove them first".
Fix string
}
InUseError refuses removing a thing while others still depend on it and names them; it matches ErrConflict, so every adapter reports it as a conflict with this one message.
func (*InUseError) Error ¶
func (e *InUseError) Error() string
func (*InUseError) Unwrap ¶
func (e *InUseError) Unwrap() error
type RetryAfterError ¶
RetryAfterError is a Retryable failure that also says how long to wait first, such as a host's rate-limit reset.
func (*RetryAfterError) Error ¶
func (e *RetryAfterError) Error() string
func (*RetryAfterError) Unwrap ¶
func (e *RetryAfterError) Unwrap() []error