{"record":{"id":"904423c64c67bcba","repo":"atuinsh/atuin","slug":"unknown-error","errorCode":null,"errorMessage":"Unknown error","messagePattern":"Unknown error","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/atuin-client/src/api_client.rs","lineNumber":639,"sourceCode":"        let index = resp.json().await?;\n\n        debug!(\"got remote index {index:?}\");\n\n        Ok(index)\n    }\n\n    #[instrument(level = \"trace\", skip_all, err)]\n    pub async fn delete(&self) -> Result<()> {\n        let url = self.sync_addr.append([\"account\"])?;\n\n        let resp = self.client.delete(url).send().await?;\n\n        if resp.status() == 403 {\n            bail!(\"invalid login details\");\n        } else if resp.status() == 200 {\n            Ok(())\n        } else {\n            bail!(\"Unknown error\");\n        }\n    }\n\n    #[instrument(level = \"trace\", skip_all, err)]\n    pub async fn change_password(\n        &self,\n        current_password: String,\n        new_password: String,\n    ) -> Result<()> {\n        let url = self.sync_addr.append_path(\"account/password\")?;\n\n        let resp = self\n            .client\n            .patch(url)\n            .json(&ChangePasswordRequest {\n                current_password,\n                new_password,\n            })","sourceCodeStart":621,"sourceCodeEnd":657,"githubUrl":"https://github.com/atuinsh/atuin/blob/900007c48045867e7f44b0f9bc55ad9dbe99ee0d/crates/atuin-client/src/api_client.rs#L621-L657","documentation":"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.","triggerScenarios":"`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.","commonSituations":"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.","solutions":["Check network/proxy behavior — a redirect or 5xx is a common hidden cause; test with `curl -v` against the account endpoint","Look at the sync server logs for the corresponding request status","Update client and server to matching versions","Retry after transient conditions (429/5xx) clear"],"exampleFix":"null","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"match client.delete().await {\n    Err(e) if e.to_string() == \"Unknown error\" => {\n        // Opaque status: diagnose via server logs or curl -v on the account endpoint\n        eprintln!(\"Unhandled server response during account delete; check server logs.\");\n    }\n    other => other,\n}","preventionTips":["Test the endpoint with `curl -v` when delete fails opaquely","Avoid proxies that rewrite DELETE requests or redirect them","Keep server and client versions aligned"],"tags":["http","unhandled-status","account","opaque-error"],"backgroundTag":"unexpected-http-status","analyzedSha":"900007c48045867e7f44b0f9bc55ad9dbe99ee0d","analyzedAt":"2026-09-19T12:52:51.491Z","contentChangedAt":"2026-09-19T12:52:51.491Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}