{"record":{"id":"0dafd0f94d448ab2","repo":"diegosouzapw/OmniRoute","slug":"chatgpt-cookie-or-verified-browser-storage-state-i","errorCode":null,"errorMessage":"ChatGPT Cookie or verified browser storage state is required","messagePattern":"ChatGPT Cookie or verified browser storage state is required","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"open-sse/executors/chatgpt-web-codex/credentials.ts","lineNumber":17,"sourceCode":"export type ChatGptWebCodexSecrets = {\n  cookie?: string;\n  storageState?: Record<string, unknown>;\n  runtimeKey?: string;\n};\n\nconst VERSION = 2;\n\nfunction normalizedCookie(value: string): string {\n  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    ) {","sourceCodeStart":1,"sourceCodeEnd":35,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/open-sse/executors/chatgpt-web-codex/credentials.ts#L1-L35","documentation":"Error \"ChatGPT Cookie or verified browser storage state is required\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at open-sse/executors/chatgpt-web-codex/credentials.ts:17 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"}