atuinsh/atuin · error
{}
Error message
{} What it means
Error "{}" thrown in atuinsh/atuin.
Source
Thrown at crates/atuin-client/src/auth.rs:310
.context("failed to connect to Atuin Hub")?;
let status = resp.status();
if status.is_success() {
let login: LoginResponse = resp.json().await?;
return Ok(AuthResponse::Success {
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!({View on GitHub (pinned to 15fe1318f1)
Solutions
- Read the embedded message for the specific cause and address it, then retry.
When it happens
Trigger: Fires when a Hub authentication error body must be surfaced verbatim to the user.
Common situations: See trigger scenarios.
AI-assisted analysis of atuinsh/atuin@15fe1318f1 (2026-08-19).
Data as JSON: /api/errors/19c84ee9e22f8194.
Report an issue: GitHub.