{"record":{"id":"6eb8677225a83ff6","repo":"atuinsh/atuin","slug":"rate-limited-please-wait-before-doing-that-again","errorCode":null,"errorMessage":"Rate limited; please wait before doing that again","messagePattern":"Rate limited; please wait before doing that again","errorType":"http","errorClass":null,"httpStatus":429,"severity":"error","filePath":"crates/atuin-client/src/api_client.rs","lineNumber":242,"sourceCode":"        return Ok(false);\n    }\n\n    Ok(true)\n}\n\n#[instrument(level = \"trace\", skip_all, err)]\nasync fn handle_resp_error(resp: Response) -> Result<Response> {\n    let status = resp.status();\n    let url = resp.url().to_string();\n\n    if status == StatusCode::SERVICE_UNAVAILABLE {\n        bail!(\n            \"Service unavailable: check https://status.atuin.sh (or get in touch with your host)\"\n        );\n    }\n\n    if status == StatusCode::TOO_MANY_REQUESTS {\n        bail!(\"Rate limited; please wait before doing that again\");\n    }\n\n    if !status.is_success() {\n        let body = resp.text().await.unwrap_or_default();\n\n        if let Ok(error) = serde_json::from_str::<ErrorResponse>(&body) {\n            let reason = error.reason;\n\n            if status.is_client_error() {\n                bail!(\"Invalid request to the service at {url}, {status} - {reason}.\");\n            }\n\n            bail!(\n                \"There was an error with the atuin sync service at {url}, server error {status}: \\\n                 {reason}.\\nIf the problem persists, contact the host\"\n            );\n        }\n","sourceCodeStart":224,"sourceCodeEnd":260,"githubUrl":"https://github.com/atuinsh/atuin/blob/c0c717ab04c881764bcad4b3d169a507e2432643/crates/atuin-client/src/api_client.rs#L224-L260","documentation":"Sentinel guard in handle_resp_error: raised when the sync API responds with HTTP 429 TOO_MANY_REQUESTS, meaning the server-side rate limiter rejected a request from register, login, latest_version, page, me, or delete_store. This is client back-pressure, not a code defect — too many requests were issued in a short window.","triggerScenarios":"Thrown at crates/atuin-client/src/api_client.rs:242 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Wait before retrying; honor the Retry-After header if the server supplies one","Reduce request frequency or batch operations instead of issuing many small requests","Check for retry loops in your setup that could hammer the API"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c0c717ab04c881764bcad4b3d169a507e2432643","analyzedAt":"2026-09-12T07:40:01.341Z","contentChangedAt":"2026-09-12T07:40:01.341Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}