atuinsh/atuin · error

Hub account deletion failed with status

Error message

Hub account deletion failed with status {status}

What it means

In `delete_account`, any HTTP status other than the explicitly handled ones (2FA codes, 401, 403) falls into the catch-all branch, which bails with "Hub account deletion failed with status {status}". This surfaces unexpected server responses (5xx, 429, etc.) with the raw status code.

Solutions

  1. Note the status code in the message and retry after a delay (429/5xx are usually transient)
  2. Check Atuin Hub status / service health for ongoing incidents
  3. Update the atuin CLI in case the Hub API changed
  4. Inspect network path (VPN/proxy) and retry; if persistent, report the issue with the status code
Defensive patterns

Strategy: retry

Try / catch

match delete_account(&client, password).await {
    Err(e) if e.to_string().contains("status 429") || e.to_string().contains("status 5") => {
        tokio::time::sleep(BACKOFF).await; // retry
    }
    other => diagnose_status(other),
}

Prevention

When it happens

Trigger: Calling `delete_account` when the Hub returns an unhandled status: 500/502/503 server errors, 429 rate limiting, 404 if the endpoint moved, or network proxies injecting non-JSON responses.

Common situations: Atuin Hub outage or maintenance; local proxy/firewall intercepting the request; client/server version skew where the delete endpoint changed; hitting rate limits after repeated attempts.

Understand the failure class

Background: "API error: {status}" and "HTTP 401/403/404/429/5xx" errors: non-2xx HTTP responses explained — this error's family across 27 libraries.

Related errors


AI-assisted analysis of atuinsh/atuin@900007c480 (2026-09-19). Data as JSON: /api/errors/d781fa31d8f2232a. Report an issue: GitHub.

Appendix: source

Thrown at crates/atuin-client/src/auth.rs:487

                Some("2fa_required") => return Ok(MutateResponse::TwoFactorRequired),
                Some("invalid_2fa_code") => {
                    bail!("invalid two-factor code");
                }
                _ => {
                    bail!("{}", err.reason);
                }
            }
        }

        match status {
            StatusCode::UNAUTHORIZED => {
                bail!("password is incorrect");
            }
            StatusCode::FORBIDDEN => {
                bail!("invalid login details");
            }
            _ => {
                bail!("Hub account deletion failed with status {status}");
            }
        }
    }
}

View on GitHub (pinned to 900007c480)