Skip to main content

handle_failover

Function handle_failover 

Source
pub async fn handle_failover(
    task_id: &str,
    agent_name: &str,
    error_type: RetryableError,
    error_message: &str,
    credit_recorded: bool,
    store: &Option<Arc<TaskStore>>,
    repo: &str,
) -> String
Expand description

Handle failover for any retryable error type. Returns “new” on reroute (or retryable exhaustion), “blocked” on hard exhaustion, “needs_review” when no fallback agents are available. credit_recorded means the caller already ran record_credit_exhaustion; the generic failure_count: counter must not be bumped here or the next ordinary failure starts at the extended backoff tier (issue #3652). Rate-limit event DB recording is done by the caller (mod.rs)