Mintplex-Labs/anything-llm · error

Missing filename

Error message

Missing filename

What it means

Validation guard in the DELETE /workspace/:slug/embed-queue endpoint: the request body contains no filename, so the handler cannot identify which queued file to remove from the embedding queue.

Source

Thrown at server/endpoints/workspaces.js:1018

        response.status(500).end();
      }
    }
  );

  app.delete(
    "/workspace/:slug/embed-queue",
    [
      validatedRequest,
      flexUserRoleValid([ROLES.admin, ROLES.manager]),
      validWorkspaceSlug,
    ],
    async (request, response) => {
      try {
        const workspace = response.locals.workspace;
        const { filename } = reqBody(request);
        if (!filename) {
          response
            .status(400)
            .json({ success: false, error: "Missing filename" });
          return;
        }

        const { removeQueuedFile } = require("../utils/EmbeddingWorkerManager");
        const sent = removeQueuedFile(workspace.slug, filename);
        response.status(200).json({ success: sent });
      } catch (e) {
        console.error(e.message, e);
        response.status(500).json({ success: false, error: e.message });
      }
    }
  );

  app.get(
    "/workspace/:slug/is-agent-command-available",
    [validatedRequest, flexUserRoleValid([ROLES.all]), validWorkspaceSlug],
    async (_, response) => {

View on GitHub (pinned to 3aec848f28)

Solutions

  1. Include a filename in the request.
  2. Use the exact stored document filename.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at server/endpoints/workspaces.js:1018 when the library encounters an invalid state.

Common situations: A workspace file operation was called without a filename.


AI-assisted analysis of Mintplex-Labs/anything-llm@3aec848f28 (2026-08-18). Data as JSON: /api/errors/33b169aab356b6df. Report an issue: GitHub.