Kong/insomnia · error · Error

Request not found for

Error message

Request not found for ${meta.requestId}

What it means

Template-tag runtime error for {% request %}: the request referenced by the render context's meta.requestId no longer exists in the data store, so its attributes cannot be resolved. Typically a deleted request whose template is still being rendered.

Solutions

  1. Re-select the request/workspace in the UI to refresh the render context
  2. Check whether the request was deleted while templates still reference it
  3. Guard tag usage in environments shared across deleted collections
Defensive patterns

Strategy: validation

When it happens

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

Appendix: source

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

          hide: args => args[0].value !== 'folder',
          displayName: 'Parent Index',
          help: 'Specify an index (Starting at 0) for how high up the folder tree to look',
          type: 'number',
        },
      ],

      async run(context, attribute, name, folderIndex) {
        const { meta } = context;

        if (!meta.requestId || !meta.workspaceId) {
          return null;
        }

        const request = await context.util.models.request.getById(meta.requestId);
        const workspace = await context.util.models.workspace.getById(meta.workspaceId);

        if (!request) {
          throw new Error(`Request not found for ${meta.requestId}`);
        }

        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;
        }

View on GitHub (pinned to d9bb2b0142)