Skip to main content

Module retry

Module retry 

Source
Expand description

Retry classification for the Derive adapter.

Splits DeriveHttpError and DeriveWsError into retryable, terminal, and fatal categories. The HTTP client routes errors through these helpers when driving [nautilus_network::retry::RetryManager]; the adapter-level crate::common::error::DeriveError reuses them for is_retryable / is_fatal.

Functions§

http_retry_config
Builds a [RetryConfig] for Derive HTTP calls from the adapter’s config fields.
is_fatal_http_error
Returns true for HTTP errors that signal a fatal session state requiring operator intervention (auth header rejection, session key deregistered, subaccount withdrawn).
is_fatal_ws_error
Returns true for WebSocket errors that indicate a fatal session state.
is_write_outcome_definitive_http_status
Returns true for non-JSON-RPC HTTP statuses where a state-changing write failed before the matching engine could accept it.
should_retry_http_error
Returns true for HTTP errors that can safely be retried with backoff.
should_retry_ws_error
Returns true for WebSocket errors that can safely be retried.