SelectoComponents.ErrorHandling.ErrorRecovery (selecto_components v0.3.21)
Error recovery mechanisms with retry logic and exponential backoff.
Link to this section Summary
Functions
Calculates exponential backoff delay.
Classifies an error based on its message or metadata.
Handle retry-related messages in the parent LiveView.
Initializes retry state for a socket.
Preserves current form state for retry.
Resets retry state after successful operation.
Restores preserved state after successful retry.
Component for inline retry button in error displays.
Attempts to retry an operation with exponential backoff.
Component for displaying retry status and controls.
Determines if an error is retryable based on its type.
Schedules a retry after the specified delay.
Link to this section Functions
calculate_backoff(retry_count)
Calculates exponential backoff delay.
classify_error(error)
Classifies an error based on its message or metadata.
handle_retry_message(arg, socket)
Handle retry-related messages in the parent LiveView.
init_retry_state(socket)
Initializes retry state for a socket.
preserve_state(socket, state_to_preserve)
Preserves current form state for retry.
reset_retry_state(socket)
Resets retry state after successful operation.
restore_state(socket)
Restores preserved state after successful retry.
retry_button(assigns)
Component for inline retry button in error displays.
retry_operation(socket, operation_fn, opts \\ [])
Attempts to retry an operation with exponential backoff.
retry_status(assigns)
Component for displaying retry status and controls.
retryable_error?(error)
Determines if an error is retryable based on its type.
schedule_retry(socket, operation_fn, delay_ms)
Schedules a retry after the specified delay.