Kong/insomnia · error · Error

No cookie specified

Error message

No cookie specified

What it means

The `cookie` attribute of the request template tag was used without a name argument, so there is no cookie key to look up in the jar.

Solutions

  1. Pass the cookie name as the tag's second argument
  2. Check the tag invocation syntax in the template editor
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at packages/insomnia/src/common/templating/local-template-tags.ts:916 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/ad53d63e5484b936. Report an issue: GitHub.

Appendix: source

Thrown at packages/insomnia/src/common/templating/local-template-tags.ts:916

        if (!workspace) {
          throw new Error(`Workspace not found for ${meta.workspaceId}`);
        }

        if (attribute === 'url') {
          const rendered = await context.util.render(request.url);
          const url = new URL(rendered || '', 'http://localhost');
          for (const p of request.parameters) {
            const name = await context.util.render(p.name);
            const value = await context.util.render(p.value);
            if (name && value) {
              url.searchParams.append(name, value);
            }
          }
          return url;
        }
        if (attribute === 'cookie') {
          if (!name) {
            throw new Error('No cookie specified');
          }

          const cookies = request.url
            ? await context.util.models.cookieJar.getCookiesForUrl(workspace._id, request.url)
            : (await context.util.models.cookieJar.getOrCreateForParentId(workspace._id)).cookies;
          const found = cookies.find(cookie => cookie.key === name);
          invariant(
            found,
            `No cookie with name "${name}" found in cookie jar for url "${request.url}"\nChoices are [\n\t${cookies.map(c => c.key)}\n] for`,
          );
          return found.value;
        }
        if (attribute === 'parameter') {
          if (!name) {
            throw new Error('No query parameter specified');
          }

          const parameterNames: string[] = [];

View on GitHub (pinned to d9bb2b0142)