{"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/c0c717ab04c881764bcad4b3d169a507e2432643/crates/atuin-client/src/auth.rs#L469-L492","documentation":"Final fallback in the auth-module delete_account: the Hub returned a non-success status with no parseable structured error and not 401/403, so only the interpolated HTTP status is reported. The account was not deleted; the failure cause is unknown from the client side (commonly a gateway error or unexpected server state).","triggerScenarios":"Calling delete_account and receiving unexpected statuses such as 500 (server error), 429 (rate limit), or 404 (endpoint moved).","commonSituations":"Atuin Hub outage or maintenance; API version drift; aggressive retry loops hitting rate limits.","solutions":["Note the status code in the message and check Atuin Hub service status","Retry after a delay (especially for 5xx/429)","Update the atuin CLI in case the deletion API changed"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// probe Hub availability before the destructive call\n// e.g. GET /me returns 200 => proceed","typeGuard":null,"tryCatchPattern":"match delete_account(...).await {\n    Err(e) if e.to_string().contains(\"status 5\") || e.to_string().contains(\"status 429\") => {\n        tokio::time::sleep(Duration::from_secs(30)).await;\n        // retry once\n    }\n    other => /* handle normally */ (),\n}","preventionTips":["Check Atuin Hub status before account operations","Back off and retry on 5xx/429 rather than hammering the API"],"tags":["http","api","network"],"backgroundTag":"unexpected-http-status","analyzedSha":"c0c717ab04c881764bcad4b3d169a507e2432643","analyzedAt":"2026-09-12T07:40:01.341Z","contentChangedAt":"2026-09-12T07:40:01.341Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}