{"record":{"id":"952aa39410b88219","repo":"diegosouzapw/OmniRoute","slug":"http-429","errorCode":"HTTP_429","errorMessage":"Grok rate limited. Wait a moment and retry, or rotate cookies.","messagePattern":"Grok rate limited\\. Wait a moment and retry, or rotate cookies\\.","errorType":"http","errorClass":null,"httpStatus":429,"severity":"error","filePath":"open-sse/executors/grok-web.ts","lineNumber":704,"sourceCode":"      message:\n        \"Grok returned a Cloudflare bot-management challenge instead of a real response. \" +\n        \"cf_clearance is pinned to the IP+TLS+UA that earned it and can't be replayed from \" +\n        \"a datacenter/sandbox egress. Probe from a residential IP, or use the official xAI API \" +\n        \"(provider: 'grok') instead.\",\n    };\n  }\n  if (status === 401 || status === 403) {\n    return {\n      type: \"authentication_error\",\n      code: `HTTP_${status}`,\n      message:\n        \"Grok auth failed — SSO cookie may be expired. Re-paste your sso cookie value from grok.com.\",\n    };\n  }\n  if (status === 429) {\n    return {\n      type: \"rate_limit_error\",\n      code: \"HTTP_429\",\n      message: \"Grok rate limited. Wait a moment and retry, or rotate cookies.\",\n    };\n  }\n  return {\n    type: \"upstream_error\",\n    code: `HTTP_${status}`,\n    message: `Grok returned HTTP ${status}`,\n  };\n}\n\nfunction buildGrokNullBodyErrorResponse(\n  status: number,\n  classification: GrokNullBodyError\n): Response {\n  return new Response(\n    JSON.stringify({\n      error: {\n        message: classification.message,","sourceCodeStart":686,"sourceCodeEnd":722,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/open-sse/executors/grok-web.ts#L686-L722","documentation":"Grok web status/classification mapper: a 401/403 from grok.com means the SSO cookie is expired or invalid (and a Cloudflare challenge means cf_clearance cannot be replayed from datacenter egress). The mapper returns a typed authentication_error so callers get an actionable message instead of a raw HTML block page.","triggerScenarios":"Thrown at open-sse/executors/grok-web.ts:704 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Re-paste the sso cookie value from grok.com into the connection","Probe cf_clearance from a residential IP matching the pinned IP+TLS+UA","Switch to the official xAI API provider ('grok') to avoid cookie churn"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d","analyzedAt":"2026-08-25T18:35:09.898Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}