Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrProviderResourceMissing = errors.New("record no longer exists on the billing provider") ErrPaymentFailed = errors.New("payment failed") )
Functions ¶
func TranslateStripeError ¶
TranslateStripeError converts a stripe or network error into a *ProviderError so callers can match it with errors.Is against the Err* kinds. Errors that don't match a known kind are returned unchanged.
Types ¶
type ProviderError ¶
type ProviderError struct {
Kind error
Message string
RequestID string
// contains filtered or unexported fields
}
ProviderError is a billing provider failure classified as one of the Err* kinds above. Message carries the provider's human-readable message, RequestID the provider's id for the failed request (for support tickets).
func (*ProviderError) Error ¶
func (e *ProviderError) Error() string
func (*ProviderError) Unwrap ¶
func (e *ProviderError) Unwrap() []error
Click to show internal directories.
Click to hide internal directories.