{"record":{"id":"2d4db4335a74def2","repo":"diegosouzapw/OmniRoute","slug":"invalid-cookie-json-at-index-i-missing-require-2d4db4","errorCode":null,"errorMessage":"Invalid cookie JSON at index ${i}: missing required field 'value'","messagePattern":"Invalid cookie JSON at index (.+?): missing required field 'value'","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/lib/providers/webCookieAuth.ts","lineNumber":54,"sourceCode":"    return null;\n  }\n\n  if (!Array.isArray(parsed)) return null;\n  if (parsed.length === 0) return \"\";\n\n  const parts: string[] = [];\n  for (let i = 0; i < parsed.length; i++) {\n    const entry = parsed[i];\n    if (!entry || typeof entry !== \"object\" || Array.isArray(entry)) {\n      throw new Error(`Invalid cookie JSON at index ${i}: expected an object`);\n    }\n    const record = entry as Record<string, unknown>;\n\n    if (typeof record.name !== \"string\" || !record.name) {\n      throw new Error(`Invalid cookie JSON at index ${i}: missing required field 'name'`);\n    }\n    if (typeof record.value !== \"string\") {\n      throw new Error(`Invalid cookie JSON at index ${i}: missing required field 'value'`);\n    }\n\n    parts.push(`${record.name}=${record.value}`);\n  }\n\n  return parts.join(\"; \");\n}\n\nexport function normalizeSessionCookieHeader(rawValue: string, defaultCookieName: string): string {\n  const stripped = stripCookieInputPrefix(rawValue);\n  if (!stripped) return \"\";\n\n  const jsonResult = parseJsonCookiesToHeader(stripped);\n  if (jsonResult !== null) {\n    return jsonResult;\n  }\n\n  if (stripped.includes(\"=\")) {","sourceCodeStart":36,"sourceCodeEnd":72,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/lib/providers/webCookieAuth.ts#L36-L72","documentation":"Error \"Invalid cookie JSON at index ${i}: missing required field 'value'\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at src/lib/providers/webCookieAuth.ts:54 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"}