Skip to main content

Module error

Module error 

Source
Expand description

Error types and helpers.

Structs§

BaseFields
Base fields extracted from any typed error variant.

Enums§

Error
All error variants returned by the Threads API client.

Functions§

extract_base_fields
Extract common base fields from a typed error variant. Returns None for Http and Json variants.
new_api_error
Create a new generic API error.
new_authentication_error
Create a new authentication error.
new_network_error
Create a new network error without an underlying cause.
new_network_error_with_cause
Create a new network error wrapping an underlying reqwest cause.
new_rate_limit_error
Create a new rate-limit error.
new_validation_error
Create a new validation error.
set_error_metadata
Set transient flag, HTTP status code, and error subcode on a typed error.

Type Aliases§

Result
Alias for std::result::Result<T, Error>.