{"record":{"id":"6c549730ed3fa9ba","repo":"Kong/insomnia","slug":"failed-to-create-cookie-extension-must-be-key","errorCode":null,"errorMessage":"failed to create cookie, extension must be: { key: string; value: string }[]","messagePattern":"failed to create cookie, extension must be: (.+?)\\[\\]","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/insomnia-scripting-environment/src/objects/cookies.ts","lineNumber":103,"sourceCode":"    }\n\n    // Tough Cookies extensions works well with string[], but not {key: string; value: string}[]\n    const extensions = cookieObj.extensions?.map((entry: string | { key: string; value: string }) => {\n      if (typeof entry === 'string') {\n        const equalPos = entry.indexOf('=');\n        if (equalPos > 0) {\n          return { key: entry.slice(0, equalPos), value: entry.slice(equalPos + 1) };\n        }\n        return { key: entry, value: 'true' };\n      } else if (\n        'key' in entry &&\n        'value' in entry &&\n        typeof entry.key === 'string' &&\n        typeof entry.value === 'string'\n      ) {\n        return { key: entry.key, value: entry.value };\n      }\n      throw new Error('failed to create cookie, extension must be: { key: string; value: string }[]');\n    });\n\n    return {\n      key: cookieObj.key,\n      value: cookieObj.value,\n      expires: cookieObj.expires || undefined,\n      maxAge: cookieObj.maxAge,\n      domain: cookieObj.domain || undefined,\n      path: cookieObj.path || undefined,\n      secure: cookieObj.secure || false,\n      httpOnly: cookieObj.httpOnly || false,\n      hostOnly,\n      session,\n      extensions: extensions,\n    };\n  }\n\n  static stringify(cookie: Cookie) {","sourceCodeStart":85,"sourceCodeEnd":121,"githubUrl":"https://github.com/Kong/insomnia/blob/d9bb2b0142600f21309832daea3317942d285984/packages/insomnia-scripting-environment/src/objects/cookies.ts#L85-L121","documentation":"Error \"failed to create cookie, extension must be: { key: string; value: string }[]\" thrown in Kong/insomnia.","triggerScenarios":"Thrown at packages/insomnia-scripting-environment/src/objects/cookies.ts:103 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"}