{"record":{"id":"1413f2ef3325acef","repo":"atuinsh/atuin","slug":"authentication-failed","errorCode":null,"errorMessage":"Authentication failed: {}","messagePattern":"Authentication failed: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/atuin-client/src/hub.rs","lineNumber":164,"sourceCode":"    pub async fn wait_for_completion(\n        &self,\n        timeout: Duration,\n        poll_interval: Duration,\n    ) -> Result<String> {\n        let start = std::time::Instant::now();\n\n        debug!(\"Polling for Hub authentication completion...\");\n\n        loop {\n            if start.elapsed() > timeout {\n                warn!(\"Authentication loop exited due to timeout\");\n                bail!(\"Authentication timed out. Please try again.\");\n            }\n\n            match self.poll().await? {\n                HubAuthStatus::Complete(token) => return Ok(token),\n                HubAuthStatus::Failed(error) => {\n                    bail!(\"Authentication failed: {}\", error);\n                }\n                HubAuthStatus::Pending => {\n                    tokio::time::sleep(poll_interval).await;\n                }\n            }\n        }\n    }\n}\n\n/// Save a hub session token\n///\n/// This saves the token to the meta store so it can be used for subsequent Hub API calls.\n/// Note: This is separate from the sync session token.\npub async fn save_session(token: &str) -> Result<()> {\n    Settings::meta_store()\n        .await?\n        .save_hub_session(token)\n        .await","sourceCodeStart":146,"sourceCodeEnd":182,"githubUrl":"https://github.com/atuinsh/atuin/blob/15fe1318f1df51de604262eb50734c9883d48e7b/crates/atuin-client/src/hub.rs#L146-L182","documentation":"Error \"Authentication failed: {}\" thrown in atuinsh/atuin.","triggerScenarios":"Fires when the Hub authentication flow completes with an error that must be surfaced to the user.","commonSituations":"See trigger scenarios.","solutions":["Read the embedded failure reason, fix the cause, and retry authentication."],"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"}