atuinsh/atuin · error

Invalid request to the service at {url}, {status} - {reason}

Error message

Invalid request to the service at {url}, {status} - {reason}.

What it means

Catch-all mapping in handle_resp_error for any HTTP 4xx client error whose JSON body parses as an ErrorResponse: the request sent by register, login, latest_version, page, me, or delete_store was rejected because of something wrong with the request itself (bad auth token, malformed payload, unknown resource), not with the service. The failing URL and the server-provided reason are embedded in the message.

Source

Thrown at crates/atuin-client/src/api_client.rs:252

    if status == StatusCode::SERVICE_UNAVAILABLE {
        bail!(
            "Service unavailable: check https://status.atuin.sh (or get in touch with your host)"
        );
    }

    if status == StatusCode::TOO_MANY_REQUESTS {
        bail!("Rate limited; please wait before doing that again");
    }

    if !status.is_success() {
        let body = resp.text().await.unwrap_or_default();

        if let Ok(error) = serde_json::from_str::<ErrorResponse>(&body) {
            let reason = error.reason;

            if status.is_client_error() {
                bail!("Invalid request to the service at {url}, {status} - {reason}.");
            }

            bail!(
                "There was an error with the atuin sync service at {url}, server error {status}: \
                 {reason}.\nIf the problem persists, contact the host"
            );
        }

        bail!(
            "There was an error with the atuin sync service at {url}, Status \
             {status:?}.\nResponse body: {body}\nIf the problem persists, contact the host"
        );
    }

    Ok(resp)
}

/// Build the capability reader for a sync server.

View on GitHub (pinned to c0c717ab04)

Solutions

  1. Read the {reason} and {status} in the message to identify which request parameter the server rejected
  2. Re-run 'atuin login' to refresh a stale or invalid session token
  3. Verify the request payload and target URL; check for client/server version mismatches
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/atuin-client/src/api_client.rs:252 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/f604f35464e5b7e4. Report an issue: GitHub.