Documentation
¶
Overview ¶
Package errors provides structured error types for the message gateway.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoRecipients = errors.New("no recipients specified") ErrNoFromAddress = errors.New("no from address specified") ErrNoDefaultProvider = errors.New("no default provider configured") )
Sentinel errors for common failure cases.
Functions ¶
func IsConfigError ¶
IsConfigError checks if an error is a ConfigError.
func IsProviderError ¶
IsProviderError checks if an error is a ProviderError.
func IsProviderNotFound ¶
IsProviderNotFound checks if an error is a ProviderNotFoundError.
Types ¶
type ConfigError ¶
ConfigError represents a configuration error.
func NewConfigError ¶
func NewConfigError(provider, field, message string) *ConfigError
NewConfigError creates a new ConfigError.
func (*ConfigError) Error ¶
func (e *ConfigError) Error() string
func (*ConfigError) Unwrap ¶
func (e *ConfigError) Unwrap() error
type ProviderError ¶
ProviderError represents an error from a message provider.
func NewProviderError ¶
func NewProviderError(provider, message string, statusCode int, err error) *ProviderError
NewProviderError creates a new ProviderError.
func (*ProviderError) Error ¶
func (e *ProviderError) Error() string
func (*ProviderError) Unwrap ¶
func (e *ProviderError) Unwrap() error
type ProviderNotFoundError ¶
ProviderNotFoundError indicates a requested provider doesn't exist.
func NewProviderNotFoundError ¶
func NewProviderNotFoundError(providerType, providerName string) *ProviderNotFoundError
NewProviderNotFoundError creates a new ProviderNotFoundError.
func (*ProviderNotFoundError) Error ¶
func (e *ProviderNotFoundError) Error() string
Click to show internal directories.
Click to hide internal directories.