Kong/insomnia · error · Error

contentInfo: header Content-Type value is blank

Error message

contentInfo: header Content-Type value is blank

What it means

Error "contentInfo: header Content-Type value is blank" thrown in Kong/insomnia.

Source

Thrown at packages/insomnia-scripting-environment/src/objects/response.ts:107

    });
  }

  static isResponse(obj: object) {
    return '_kind' in obj && obj._kind === 'Response';
  }

  contentInfo(): ResponseContentInfo {
    const mimeInfo = {
      mimeType: 'application/octet-stream',
      mimeFormat: '', // TODO: it's definition is unknown
      charset: 'utf8',
    };

    const contentType = this.headers.find(header => header.key === 'Content-Type');
    if (contentType) {
      const directives = contentType.valueOf().split('; ');
      if (directives.length === 0) {
        throw new Error('contentInfo: header Content-Type value is blank');
      } else {
        const mimeType = directives[0];
        if (!mimeType) {
          throw new Error('contentInfo: mime type in header Content-Type is invalid');
        }
        mimeInfo.mimeType = mimeType;
        directives.forEach(dir => {
          if (dir.startsWith('charset')) {
            mimeInfo.charset = dir.slice(dir.indexOf('=') + 1);
          }
        });
      }
    }

    const fileInfo = {
      extension: '',
      name: 'unknown',
    };

View on GitHub (pinned to d9bb2b0142)

When it happens

Trigger: Thrown at packages/insomnia-scripting-environment/src/objects/response.ts:107 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Kong/insomnia@d9bb2b0142 (2026-08-26). Data as JSON: /api/errors/32baee918fb2ee08. Report an issue: GitHub.