{"record":{"id":"66787f59b12aa306","repo":"atuinsh/atuin","slug":"hub-login-failed-with-status-status","errorCode":null,"errorMessage":"Hub login failed with status {status}","messagePattern":"Hub login failed with status (.+?)","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/atuin-client/src/auth.rs","lineNumber":319,"sourceCode":"                session: login.session,\n                auth_type: login.auth,\n            });\n        }\n\n        if status == StatusCode::FORBIDDEN\n            && let Ok(err) = resp.json::<HubErrorResponse>().await\n        {\n            if err.code.as_deref() == Some(\"2fa_required\") {\n                return Ok(AuthResponse::TwoFactorRequired);\n            }\n            bail!(\"{}\", err.reason);\n        }\n\n        if status == StatusCode::UNAUTHORIZED {\n            bail!(\"invalid credentials\");\n        }\n\n        bail!(\"Hub login failed with status {status}\");\n    }\n\n    async fn register(&self, username: &str, email: &str, password: &str) -> Result<AuthResponse> {\n        let url = self.address.append_path(\"api/v0/register\")?;\n        let client = reqwest::Client::new();\n\n        let resp = client\n            .post(url)\n            .header(USER_AGENT, APP_USER_AGENT)\n            .header(ATUIN_HEADER_VERSION, ATUIN_CARGO_VERSION)\n            .json(&serde_json::json!({\n                \"email\": email,\n                \"username\": username,\n                \"password\": password,\n            }))\n            .send()\n            .await\n            .context(\"failed to connect to Atuin Hub\")?;","sourceCodeStart":301,"sourceCodeEnd":337,"githubUrl":"https://github.com/atuinsh/atuin/blob/c0c717ab04c881764bcad4b3d169a507e2432643/crates/atuin-client/src/auth.rs#L301-L337","documentation":"Final fallback in the auth-module login: the Hub returned a non-success status that is neither 403-with-structured-error nor 401, and the body did not decode as a HubErrorResponse. The concrete status code is interpolated into the message since no richer diagnosis is available — often a proxy/gateway error page or unexpected server state.","triggerScenarios":"Thrown at crates/atuin-client/src/auth.rs:319 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use the interpolated {status} to identify the failure class (5xx → server issue, 3xx → redirect/proxy)","Check https://status.atuin.sh and retry","Verify no reverse proxy or captive portal is intercepting the request"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}