errors

package
v0.117.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

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")
	ErrProviderUnavailable     = errors.New("billing provider is unavailable")
)

Functions

func TranslateStripeError

func TranslateStripeError(err error) error

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

Jump to

Keyboard shortcuts

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