Kong/insomnia · error · Error

curlOutputToResponse: no header result is found

Error message

curlOutputToResponse: no header result is found

What it means

Guard in curlOutputToResponse: curl produced no header results at all, so there is no status line/headers to build a Response from — usually indicates the curl process failed before any response bytes.

Solutions

  1. Check result.patch.error and curl logs for the underlying network failure
  2. Verify the request URL and proxy settings
  3. Retry the sendRequest call
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at packages/insomnia-scripting-environment/src/objects/send-request.ts:203 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/0ded5723f53828ff. Report an issue: GitHub.

Appendix: source

Thrown at packages/insomnia-scripting-environment/src/objects/send-request.ts:203

              name: '',
            },
          ]
        : [],
      caCertficatePath: null, // the request in pre-request script doesn't support customizing ca yet
      socketPath: undefined,
      authHeader: undefined, // TODO: add this for bearer and other auth methods
    };
  }

  throw new Error('the request type must be: string | Request | RequestOptions.');
}

async function curlOutputToResponse(
  result: CurlRequestOutput,
  request: string | Request | RequestOptions,
): Promise<Response> {
  if (result.headerResults.length === 0) {
    throw new Error('curlOutputToResponse: no header result is found');
  }
  if (result.patch.error) {
    throw result.patch.error;
  }

  const lastRedirect = result.headerResults[result.headerResults.length - 1];
  if (!lastRedirect) {
    throw new Error('curlOutputToResponse: the lastRedirect is not defined');
  }

  const originalRequest =
    typeof request === 'string'
      ? new Request({ url: request, method: 'GET' })
      : request instanceof Request
        ? request
        : new Request(request);

  const headers = lastRedirect.headers.map((header: { name: string; value: string }) => ({

View on GitHub (pinned to d9bb2b0142)