{"record":{"id":"e3eeb27d398ef9f4","repo":"Kong/insomnia","slug":"failed-to-parse-cookie-the-cookie-string-seems-in","errorCode":null,"errorMessage":"failed to parse cookie, the cookie string seems invalid","messagePattern":"failed to parse cookie, the cookie string seems invalid","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/insomnia-scripting-environment/src/objects/cookies.ts","lineNumber":42,"sourceCode":"  httpOnly?: boolean;\n  hostOnly?: boolean;\n  session?: boolean;\n  extensions?: { key: string; value: string }[];\n}\n\nexport class Cookie extends Property {\n  override readonly _kind: string = 'Cookie';\n  protected cookie: ToughCookie;\n  private extensions?: { key: string; value: string }[];\n  private insoExtensions: InsomniaCookieExtensions = {};\n\n  constructor(cookieDef: CookieOptions | string) {\n    super();\n\n    if (typeof cookieDef === 'string') {\n      const cookieDefParsed = Cookie.parse(cookieDef);\n      if (!cookieDefParsed) {\n        throw new Error('failed to parse cookie, the cookie string seems invalid');\n      }\n      cookieDef = cookieDefParsed;\n    }\n\n    const def = { ...cookieDef };\n    this.extensions = def.extensions ? [...def.extensions] : [];\n    def.extensions = [];\n\n    const cookie = ToughCookie.fromJSON(def);\n    if (!cookie) {\n      throw new Error('failed to parse cookie, the cookie string seems invalid');\n    }\n\n    this.id = cookieDef.id || '';\n    this.cookie = cookie;\n    this.insoExtensions = {\n      creation: cookieDef.creation,\n      creationIndex: cookieDef.creationIndex,","sourceCodeStart":24,"sourceCodeEnd":60,"githubUrl":"https://github.com/Kong/insomnia/blob/d9bb2b0142600f21309832daea3317942d285984/packages/insomnia-scripting-environment/src/objects/cookies.ts#L24-L60","documentation":"Error \"failed to parse cookie, the cookie string seems invalid\" thrown in Kong/insomnia.","triggerScenarios":"Thrown at packages/insomnia-scripting-environment/src/objects/cookies.ts:42 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":"d9bb2b0142600f21309832daea3317942d285984","analyzedAt":"2026-08-26T18:04:05.187Z","schemaVersion":2},"datasetVersion":"2026-08-26T21:11:00.512Z"}