Documentation
¶
Overview ¶
Package errs holds the SDK's error types. They are re-exported from the top-level fal package (fal.Error, fal.HTTPError, ...) via type aliases, so most callers never import this package directly; it exists so that the transport, auth and feature packages can construct and match the same error values without a dependency on the facade.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error struct {
Message string
}
Error is the base error type for the SDK. It mirrors fal_client.FalClientError.
HTTPError, TimeoutError and MissingCredentialsError are distinct concrete types rather than wrappers of Error; use errors.As to inspect them.
type HTTPError ¶
HTTPError is returned when the API responds with a non-2xx status. It mirrors fal_client.FalClientHTTPError.
For security, HTTPError never carries request headers, and credential-bearing response headers are redacted before being stored in Headers. Construct it only via NewHTTPError, which applies that redaction; never build it directly, and do not mutate Headers after construction (doing so could reintroduce a credential that redaction removed).
func NewHTTPError ¶
NewHTTPError builds a redacted *HTTPError from a non-2xx response's status, body and headers. It is the only constructor: redaction of the credential headers happens here, so an HTTPError can never escape with a live token.
The error type is taken from the X-Fal-Error-Type header, then overridden by an "error_type" field in the JSON body if present. The message is the body's "detail" field (string or raw JSON) when present, otherwise the raw body.
type MissingCredentialsError ¶
type MissingCredentialsError struct {
Message string
}
MissingCredentialsError is returned when no fal credentials can be resolved.
func (*MissingCredentialsError) Error ¶
func (e *MissingCredentialsError) Error() string
type TimeoutError ¶
TimeoutError is returned when subscribe exceeds its client timeout. It mirrors fal_client.FalClientTimeoutError.
func (*TimeoutError) Error ¶
func (e *TimeoutError) Error() string