atuinsh/atuin · error

Unknown error

Error message

Unknown error

What it means

Catch-all branch of the `delete` account call: the server answered with a status other than 200 or 403, and the client has no more specific message. Because `delete` does not use `handle_resp_error`, any unexpected status (redirect, 401, 429, 5xx) collapses into this opaque error. It signals an unhandled server response rather than a known condition.

Solutions

  1. Check network/proxy behavior — a redirect or 5xx is a common hidden cause; test with `curl -v` against the account endpoint
  2. Look at the sync server logs for the corresponding request status
  3. Update client and server to matching versions
  4. Retry after transient conditions (429/5xx) clear

Example fix

null
Defensive patterns

Strategy: try-catch

Try / catch

match client.delete().await {
    Err(e) if e.to_string() == "Unknown error" => {
        // Opaque status: diagnose via server logs or curl -v on the account endpoint
        eprintln!("Unhandled server response during account delete; check server logs.");
    }
    other => other,
}

Prevention

When it happens

Trigger: `delete()` receiving any status besides 200 and 403 — e.g. 401 unauthorized, 429 rate-limited, 500 server error, or a 3xx redirect from a misconfigured proxy.

Common situations: Reverse proxy redirecting HTTP to HTTPS and losing the DELETE body; server rate-limiting or erroring; a server version that responds differently to account deletion than the client expects.

Related errors


AI-assisted analysis of atuinsh/atuin@900007c480 (2026-09-19). Data as JSON: /api/errors/904423c64c67bcba. Report an issue: GitHub.

Appendix: source

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

        let index = resp.json().await?;

        debug!("got remote index {index:?}");

        Ok(index)
    }

    #[instrument(level = "trace", skip_all, err)]
    pub async fn delete(&self) -> Result<()> {
        let url = self.sync_addr.append(["account"])?;

        let resp = self.client.delete(url).send().await?;

        if resp.status() == 403 {
            bail!("invalid login details");
        } else if resp.status() == 200 {
            Ok(())
        } else {
            bail!("Unknown error");
        }
    }

    #[instrument(level = "trace", skip_all, err)]
    pub async fn change_password(
        &self,
        current_password: String,
        new_password: String,
    ) -> Result<()> {
        let url = self.sync_addr.append_path("account/password")?;

        let resp = self
            .client
            .patch(url)
            .json(&ChangePasswordRequest {
                current_password,
                new_password,
            })

View on GitHub (pinned to 900007c480)