{"record":{"id":"3546e882bec33aff","repo":"diegosouzapw/OmniRoute","slug":"no-credit","errorCode":"no_credit","errorMessage":"No Codex reset credits are available.","messagePattern":"No Codex reset credits are available\\.","errorType":"exception","errorClass":"CodexResetCreditError","httpStatus":409,"severity":"error","filePath":"src/lib/usage/codexResetCredits.ts","lineNumber":94,"sourceCode":"  const direct = normalizeOutcome(payload);\n  if (direct) return direct;\n\n  const record = toRecord(payload);\n  for (const key of [\"code\", \"outcome\", \"status\", \"result\", \"type\"]) {\n    const normalized = normalizeOutcome(record[key]);\n    if (normalized) return normalized;\n  }\n\n  return null;\n}\n\nfunction parseConsumeOutcome(payload: unknown): CodexResetCreditOutcome {\n  const outcome = extractOutcome(payload);\n  if (outcome === \"reset\") return \"reset\";\n  if (outcome === \"alreadyredeemed\") return \"alreadyRedeemed\";\n\n  if (outcome === \"nocredit\" || outcome === \"nocredits\") {\n    throw new CodexResetCreditError(409, \"no_credit\", \"No Codex reset credits are available.\");\n  }\n\n  if (outcome === \"nothingtoreset\") {\n    throw new CodexResetCreditError(\n      409,\n      \"nothing_to_reset\",\n      \"No exhausted Codex usage limit can be reset right now.\"\n    );\n  }\n\n  throw new CodexResetCreditError(\n    502,\n    \"unknown_reset_credit_response\",\n    \"Codex returned an unknown reset-credit response.\"\n  );\n}\n\nfunction throwKnownConsumeError(payload: unknown): void {","sourceCodeStart":76,"sourceCodeEnd":112,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/lib/usage/codexResetCredits.ts#L76-L112","documentation":"Error \"No Codex reset credits are available.\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at src/lib/usage/codexResetCredits.ts:94 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d","analyzedAt":"2026-08-25T18:35:09.898Z","schemaVersion":2},"datasetVersion":"2026-08-25T21:54:21.419Z"}