{"record":{"id":"4048461ab0466050","repo":"Kong/insomnia","slug":"json-failed-to-parse-e","errorCode":null,"errorMessage":"json: failed to parse: ${e}","messagePattern":"json: failed to parse: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/insomnia-scripting-environment/src/objects/response.ts","lineNumber":164,"sourceCode":"    };\n  }\n\n  dataURI() {\n    const contentInfo = this.contentInfo();\n    const bodyInBase64 = this.stream || this.body;\n    if (!bodyInBase64) {\n      throw new Error('dataURI(): response body is not defined');\n    }\n\n    return `data:${contentInfo.contentType};baseg4, ${bodyInBase64}`;\n  }\n\n  json(reviver?: (key: string, value: any) => any, _strict?: boolean) {\n    // TODO: enable strict after common module is introduced\n    try {\n      return JSON.parse(this.body.toString(), reviver);\n    } catch (e) {\n      throw new Error(`json: failed to parse: ${e}`);\n    }\n  }\n\n  jsonp(_reviver?: (key: string, value: any) => any, _strict?: boolean) {\n    throw unsupportedError('jsonp()');\n  }\n\n  reason() {\n    return this.status;\n  }\n\n  size() {\n    const headerSize = calculateHeadersSize(this.headers);\n    return {\n      body: this.bytesRead,\n      header: headerSize,\n      total: this.bytesRead + headerSize,\n      source: 'COMPUTED',","sourceCodeStart":146,"sourceCodeEnd":182,"githubUrl":"https://github.com/Kong/insomnia/blob/d9bb2b0142600f21309832daea3317942d285984/packages/insomnia-scripting-environment/src/objects/response.ts#L146-L182","documentation":"Error \"json: failed to parse: ${e}\" thrown in Kong/insomnia.","triggerScenarios":"Thrown at packages/insomnia-scripting-environment/src/objects/response.ts:164 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"}