Mintplex-Labs/anything-llm · error · Error

Response could not be completed

Error message

Response could not be completed

What it means

HTTP guard in CollectorApi.processDocument: the /process request to the collector (document processing API) returned a non-ok status, meaning the collector rejected or failed the processing job and no result JSON can be parsed.

Source

Thrown at server/utils/collectorApi/index.js:134

      filename,
      metadata,
      options: this.#attachOptions(),
    });

    return await fetch(`${this.endpoint}/process`, {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
        "X-Integrity": this.comkey.sign(data),
        "X-Payload-Signer": this.comkey.encrypt(
          new EncryptionManager().xPayload
        ),
      },
      body: data,
      dispatcher: new Agent({ headersTimeout: 600000 }),
    })
      .then((res) => {
        if (!res.ok) throw new Error("Response could not be completed");
        return res.json();
      })
      .then((res) => res)
      .catch((e) => {
        this.log(e.message);
        return { success: false, reason: e.message, documents: [] };
      });
  }

  /**
   * Process a link
   * - Will append the options to the request body
   * @param {string} link - The link to process
   * @param {{[key: string]: string}} scraperHeaders - Custom headers to apply to the web-scraping request URL
   * @param {[key: string]: string} metadata - Optional metadata to attach to the document
   * @returns {Promise<Object>} - The response from the collector API
   */
  async processLink(link = "", scraperHeaders = {}, metadata = {}) {

View on GitHub (pinned to 3aec848f28)

Solutions

  1. Retry the request.
  2. Check the collector service logs and confirm it is running and reachable.
Defensive patterns

Strategy: try-catch

When it happens

Trigger: The collector API could not complete a response.

Common situations: This error is raised at runtime in server/utils/collectorApi/index.js. It occurs when the required configuration for this provider is missing or invalid (unset environment variables, empty API key or base path), when the external service is unreachable or returns an unexpected response, or when invalid input reaches the call site. To prevent it, validate the relevant provider settings and environment variables at startup and confirm the service is reachable before this code path executes.


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