Kong/insomnia · error · Error

Enter a valid endpoint URL

Error message

Enter a valid endpoint URL

What it means

Error "Enter a valid endpoint URL" thrown in Kong/insomnia.

Source

Thrown at packages/insomnia/src/ui/components/first-request-creation.tsx:72

    if (!importedRequest?.url) {
      throw new Error('Invalid cURL request');
    }

    return importedRequest;
  } catch (error) {
    throw new Error(parseCurlImportError(error));
  }
};

const normalizeRequestUrl = (value: string) => {
  const normalizedUrl = setDefaultProtocol(value.trim());

  try {
    new URL(normalizedUrl);
    return normalizedUrl;
  } catch {
    throw new Error('Enter a valid endpoint URL');
  }
};

// Collapse a multi-line cURL (backslash line-continuations and/or bare newlines,
// with their trailing indentation) into a single line, preserving intra-line spacing.
const flattenCurlCommand = (value: string) =>
  value
    .replace(/\\\r?\n\s*/g, ' ')
    .replace(/\r?\n\s*/g, ' ')
    .trim();

// Read the HTTP method from a cURL string, for keeping the method dropdown in
// sync while typing/pasting/importing. Mirrors the real importer's extractMethod
// (src/main/importers/importers/curl.ts): explicit -X/--request wins (including
// curl's cuddled short-flag form, e.g. -XPUT); otherwise -G/--get combined with a
// -d/--data flag moves the data into the query string instead of the body (so the
// method stays GET); otherwise a body/form flag implies POST, otherwise GET.
// Always resolves so the preview never goes stale relative to what the actual

View on GitHub (pinned to d9bb2b0142)

When it happens

Trigger: Thrown at packages/insomnia/src/ui/components/first-request-creation.tsx:72 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/14f20628749d5b68. Report an issue: GitHub.