{"record":{"id":"586b576efa2de545","repo":"atuinsh/atuin","slug":"invalid-credentials","errorCode":null,"errorMessage":"invalid credentials","messagePattern":"invalid credentials","errorType":"http","errorClass":null,"httpStatus":401,"severity":"error","filePath":"crates/atuin-client/src/auth.rs","lineNumber":316,"sourceCode":"        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!({\n                \"email\": email,\n                \"username\": username,\n                \"password\": password,\n            }))","sourceCodeStart":298,"sourceCodeEnd":334,"githubUrl":"https://github.com/atuinsh/atuin/blob/c0c717ab04c881764bcad4b3d169a507e2432643/crates/atuin-client/src/auth.rs#L298-L334","documentation":"Match arm in the auth-module login: the Hub responded HTTP 401 UNAUTHORIZED, meaning the username/password (or key) presented to the login endpoint do not match any account. An input-validity sentinel — the credentials themselves are at fault, not connectivity or server state.","triggerScenarios":"Thrown at crates/atuin-client/src/auth.rs:316 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Re-enter username and password carefully","Confirm the account exists (register first if not)","Check that you are pointing at the expected sync/hub server"],"exampleFix":null,"handlingStrategy":"validation","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-14T05:17:10.506Z"}