atuinsh/atuin · error
Hub login failed with status {status}
Error message
Hub login failed with status {status} What it means
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.
Source
Thrown at crates/atuin-client/src/auth.rs:319
session: login.session,
auth_type: login.auth,
});
}
if status == StatusCode::FORBIDDEN
&& let Ok(err) = resp.json::<HubErrorResponse>().await
{
if err.code.as_deref() == Some("2fa_required") {
return Ok(AuthResponse::TwoFactorRequired);
}
bail!("{}", err.reason);
}
if status == StatusCode::UNAUTHORIZED {
bail!("invalid credentials");
}
bail!("Hub login failed with status {status}");
}
async fn register(&self, username: &str, email: &str, password: &str) -> Result<AuthResponse> {
let url = self.address.append_path("api/v0/register")?;
let client = reqwest::Client::new();
let resp = client
.post(url)
.header(USER_AGENT, APP_USER_AGENT)
.header(ATUIN_HEADER_VERSION, ATUIN_CARGO_VERSION)
.json(&serde_json::json!({
"email": email,
"username": username,
"password": password,
}))
.send()
.await
.context("failed to connect to Atuin Hub")?;View on GitHub (pinned to c0c717ab04)
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
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at crates/atuin-client/src/auth.rs:319 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of atuinsh/atuin@c0c717ab04 (2026-09-12).
Data as JSON: /api/errors/66787f59b12aa306.
Report an issue: GitHub.