{"record":{"id":"5e8b872c0e3771b3","repo":"Kong/insomnia","slug":"contentinfo-mime-type-in-header-content-type-is-i","errorCode":null,"errorMessage":"contentInfo: mime type in header Content-Type is invalid","messagePattern":"contentInfo: mime type in header Content-Type is invalid","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/insomnia-scripting-environment/src/objects/response.ts","lineNumber":111,"sourceCode":"    return '_kind' in obj && obj._kind === 'Response';\n  }\n\n  contentInfo(): ResponseContentInfo {\n    const mimeInfo = {\n      mimeType: 'application/octet-stream',\n      mimeFormat: '', // TODO: it's definition is unknown\n      charset: 'utf8',\n    };\n\n    const contentType = this.headers.find(header => header.key === 'Content-Type');\n    if (contentType) {\n      const directives = contentType.valueOf().split('; ');\n      if (directives.length === 0) {\n        throw new Error('contentInfo: header Content-Type value is blank');\n      } else {\n        const mimeType = directives[0];\n        if (!mimeType) {\n          throw new Error('contentInfo: mime type in header Content-Type is invalid');\n        }\n        mimeInfo.mimeType = mimeType;\n        directives.forEach(dir => {\n          if (dir.startsWith('charset')) {\n            mimeInfo.charset = dir.slice(dir.indexOf('=') + 1);\n          }\n        });\n      }\n    }\n\n    const fileInfo = {\n      extension: '',\n      name: 'unknown',\n    };\n\n    const contentDisposition = this.headers.find(header => header.key === 'Content-Disposition');\n    if (contentDisposition) {\n      const directives = contentDisposition.valueOf().split('; ');","sourceCodeStart":93,"sourceCodeEnd":129,"githubUrl":"https://github.com/Kong/insomnia/blob/d9bb2b0142600f21309832daea3317942d285984/packages/insomnia-scripting-environment/src/objects/response.ts#L93-L129","documentation":"Error \"contentInfo: mime type in header Content-Type is invalid\" thrown in Kong/insomnia.","triggerScenarios":"Thrown at packages/insomnia-scripting-environment/src/objects/response.ts:111 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"}