{"record":{"id":"d781fa31d8f2232a","repo":"atuinsh/atuin","slug":"hub-account-deletion-failed-with-status-status","errorCode":null,"errorMessage":"Hub account deletion failed with status {status}","messagePattern":"Hub account deletion failed with status (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/atuin-client/src/auth.rs","lineNumber":487,"sourceCode":"                Some(\"2fa_required\") => return Ok(MutateResponse::TwoFactorRequired),\n                Some(\"invalid_2fa_code\") => {\n                    bail!(\"invalid two-factor code\");\n                }\n                _ => {\n                    bail!(\"{}\", err.reason);\n                }\n            }\n        }\n\n        match status {\n            StatusCode::UNAUTHORIZED => {\n                bail!(\"password is incorrect\");\n            }\n            StatusCode::FORBIDDEN => {\n                bail!(\"invalid login details\");\n            }\n            _ => {\n                bail!(\"Hub account deletion failed with status {status}\");\n            }\n        }\n    }\n}\n","sourceCodeStart":469,"sourceCodeEnd":492,"githubUrl":"https://github.com/atuinsh/atuin/blob/900007c48045867e7f44b0f9bc55ad9dbe99ee0d/crates/atuin-client/src/auth.rs#L469-L492","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Note the status code in the message and retry after a delay (429/5xx are usually transient)","Check Atuin Hub status / service health for ongoing incidents","Update the atuin CLI in case the Hub API changed","Inspect network path (VPN/proxy) and retry; if persistent, report the issue with the status code"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"match delete_account(&client, password).await {\n    Err(e) if e.to_string().contains(\"status 429\") || e.to_string().contains(\"status 5\") => {\n        tokio::time::sleep(BACKOFF).await; // retry\n    }\n    other => diagnose_status(other),\n}","preventionTips":["Check Hub service status before bulk/account operations","Add exponential backoff for retries","Keep the CLI updated against API changes","Bypass proxies/VPN when authenticating API calls fail oddly"],"tags":["http","network","api"],"backgroundTag":"http-error-response","analyzedSha":"900007c48045867e7f44b0f9bc55ad9dbe99ee0d","analyzedAt":"2026-09-19T12:52:51.491Z","contentChangedAt":"2026-09-19T12:52:51.491Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}