{"record":{"id":"d837e35e35b90330","repo":"diegosouzapw/OmniRoute","slug":"nothing-to-reset","errorCode":"nothing_to_reset","errorMessage":"No exhausted Codex usage limit can be reset right now.","messagePattern":"No exhausted Codex usage limit can be reset right now\\.","errorType":"exception","errorClass":"CodexResetCreditError","httpStatus":409,"severity":"error","filePath":"src/lib/usage/codexResetCredits.ts","lineNumber":98,"sourceCode":"  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 {\n  const outcome = extractOutcome(payload);\n\n  if (outcome === \"nocredit\" || outcome === \"nocredits\") {\n    throw new CodexResetCreditError(409, \"no_credit\", \"No Codex reset credits are available.\");","sourceCodeStart":80,"sourceCodeEnd":116,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/lib/usage/codexResetCredits.ts#L80-L116","documentation":"Codex upstream outcome mapped in parseConsumeOutcome: the consume response reported `nothingtoreset`, so a 409 nothing_to_reset error is raised. Credits exist but every usage limit on the account is currently within bounds — there is no exhausted quota for a reset credit to clear.","triggerScenarios":"Thrown at src/lib/usage/codexResetCredits.ts:98 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["No action needed — usage limits are not exhausted","Re-check after the account actually hits a limit"],"exampleFix":null,"handlingStrategy":"fallback","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"}