{"record":{"id":"19c84ee9e22f8194","repo":"atuinsh/atuin","slug":"error","errorCode":null,"errorMessage":"{}","messagePattern":"\\{\\}","errorType":"exception","errorClass":null,"httpStatus":403,"severity":"error","filePath":"crates/atuin-client/src/auth.rs","lineNumber":310,"sourceCode":"            .context(\"failed to connect to Atuin Hub\")?;\n\n        let status = resp.status();\n\n        if status.is_success() {\n            let login: LoginResponse = resp.json().await?;\n            return Ok(AuthResponse::Success {\n                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!({","sourceCodeStart":292,"sourceCodeEnd":328,"githubUrl":"https://github.com/atuinsh/atuin/blob/15fe1318f1df51de604262eb50734c9883d48e7b/crates/atuin-client/src/auth.rs#L292-L328","documentation":"Error \"{}\" thrown in atuinsh/atuin.","triggerScenarios":"Fires when a Hub authentication error body must be surfaced verbatim to the user.","commonSituations":"See trigger scenarios.","solutions":["Read the embedded message for the specific cause and address it, then retry."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"15fe1318f1df51de604262eb50734c9883d48e7b","analyzedAt":"2026-08-19T08:56:57.719Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}