Documentation
¶
Overview ¶
Package apperrors defines the typed error hierarchy returned by every package in this module. Callers use errors.As / errors.Is against these types rather than matching on string messages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIError ¶
APIError indicates the API responded with a well-formed error payload outside the other, more specific categories.
type AuthenticationError ¶
AuthenticationError indicates missing, invalid, or expired credentials, or a failed OAuth2 token exchange.
func (*AuthenticationError) Error ¶
func (e *AuthenticationError) Error() string
func (*AuthenticationError) Reason ¶
func (e *AuthenticationError) Reason() Reason
func (*AuthenticationError) Unwrap ¶
func (e *AuthenticationError) Unwrap() error
type DurationMS ¶
type DurationMS int64
DurationMS is a small named type to keep RetryAfter's unit unambiguous at call sites without importing time here (kept dependency-free).
type NetworkError ¶
NetworkError indicates a transport-level failure (timeout, connection refused, TLS failure, etc.) after retries were exhausted.
func (*NetworkError) Error ¶
func (e *NetworkError) Error() string
func (*NetworkError) Reason ¶
func (e *NetworkError) Reason() Reason
func (*NetworkError) Unwrap ¶
func (e *NetworkError) Unwrap() error
type RateLimitError ¶
type RateLimitError struct {
Message string
RetryAfter *DurationMS
}
RateLimitError indicates HTTP 429 or a Procurement API rate-limit rejection. RetryAfter is the server-provided backoff hint, if any.
func (*RateLimitError) Error ¶
func (e *RateLimitError) Error() string
func (*RateLimitError) Reason ¶
func (e *RateLimitError) Reason() Reason
type Reason ¶
type Reason string
Reason is a stable, machine-matchable classification of a failure, independent of the human-readable message.
type SOAPFaultError ¶
SOAPFaultError wraps a parsed <soap:Fault> from the legacy SOAP API.
func (*SOAPFaultError) Error ¶
func (e *SOAPFaultError) Error() string
func (*SOAPFaultError) Reason ¶
func (e *SOAPFaultError) Reason() Reason
type ValidationError ¶
ValidationError indicates the request was rejected, locally or by the API, as malformed.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
func (*ValidationError) Reason ¶
func (e *ValidationError) Reason() Reason