{"record":{"id":"632f1832ecde7b1f","repo":"diegosouzapw/OmniRoute","slug":"chatgpt-web-codex-credentials-are-missing","errorCode":null,"errorMessage":"ChatGPT Web (Codex) credentials are missing","messagePattern":"ChatGPT Web \\(Codex\\) credentials are missing","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"open-sse/executors/chatgpt-web-codex/credentials.ts","lineNumber":28,"sourceCode":"  return value.trim().replace(/^cookie\\s*:\\s*/i, \"\");\n}\n\nexport function encodeChatGptWebCodexSecrets(secrets: ChatGptWebCodexSecrets): string {\n  const cookie = secrets.cookie ? normalizedCookie(secrets.cookie) : \"\";\n  const storageState = secrets.storageState;\n  if (!cookie && (!storageState || typeof storageState !== \"object\")) {\n    throw new Error(\"ChatGPT Cookie or verified browser storage state is required\");\n  }\n  return JSON.stringify({\n    version: VERSION,\n    ...(storageState ? { storageState } : { cookie }),\n    ...(secrets.runtimeKey?.trim() ? { runtimeKey: secrets.runtimeKey.trim() } : {}),\n  });\n}\n\nexport function decodeChatGptWebCodexSecrets(value: string): ChatGptWebCodexSecrets {\n  const trimmed = value.trim();\n  if (!trimmed) throw new Error(\"ChatGPT Web (Codex) credentials are missing\");\n  try {\n    const parsed = JSON.parse(trimmed) as Record<string, unknown>;\n    if (\n      parsed.version === VERSION &&\n      parsed.storageState &&\n      typeof parsed.storageState === \"object\"\n    ) {\n      return {\n        storageState: parsed.storageState as Record<string, unknown>,\n        ...(typeof parsed.runtimeKey === \"string\" && parsed.runtimeKey.trim()\n          ? { runtimeKey: parsed.runtimeKey.trim() }\n          : {}),\n      };\n    }\n    if ((parsed.version === VERSION || parsed.version === 1) && typeof parsed.cookie === \"string\") {\n      const cookie = normalizedCookie(parsed.cookie);\n      if (!cookie) throw new Error(\"ChatGPT Cookie is missing\");\n      return {","sourceCodeStart":10,"sourceCodeEnd":46,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/open-sse/executors/chatgpt-web-codex/credentials.ts#L10-L46","documentation":"Error \"ChatGPT Web (Codex) credentials are missing\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at open-sse/executors/chatgpt-web-codex/credentials.ts:28 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"}