{"record":{"id":"04d8d3bf4421c7e9","repo":"Mintplex-Labs/anything-llm","slug":"response-could-not-be-completed","errorCode":null,"errorMessage":"Response could not be completed","messagePattern":"Response could not be completed","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"server/utils/collectorApi/index.js","lineNumber":134,"sourceCode":"      filename,\n      metadata,\n      options: this.#attachOptions(),\n    });\n\n    return await fetch(`${this.endpoint}/process`, {\n      method: \"POST\",\n      headers: {\n        \"Content-Type\": \"application/json\",\n        \"X-Integrity\": this.comkey.sign(data),\n        \"X-Payload-Signer\": this.comkey.encrypt(\n          new EncryptionManager().xPayload\n        ),\n      },\n      body: data,\n      dispatcher: new Agent({ headersTimeout: 600000 }),\n    })\n      .then((res) => {\n        if (!res.ok) throw new Error(\"Response could not be completed\");\n        return res.json();\n      })\n      .then((res) => res)\n      .catch((e) => {\n        this.log(e.message);\n        return { success: false, reason: e.message, documents: [] };\n      });\n  }\n\n  /**\n   * Process a link\n   * - Will append the options to the request body\n   * @param {string} link - The link to process\n   * @param {{[key: string]: string}} scraperHeaders - Custom headers to apply to the web-scraping request URL\n   * @param {[key: string]: string} metadata - Optional metadata to attach to the document\n   * @returns {Promise<Object>} - The response from the collector API\n   */\n  async processLink(link = \"\", scraperHeaders = {}, metadata = {}) {","sourceCodeStart":116,"sourceCodeEnd":152,"githubUrl":"https://github.com/Mintplex-Labs/anything-llm/blob/3aec848f2885144aa8f1e53b9731a04310d5d558/server/utils/collectorApi/index.js#L116-L152","documentation":"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.","triggerScenarios":"The collector API could not complete a response.","commonSituations":"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.","solutions":["Retry the request.","Check the collector service logs and confirm it is running and reachable."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3aec848f2885144aa8f1e53b9731a04310d5d558","analyzedAt":"2026-08-18T10:02:21.017Z","contentChangedAt":"2026-08-18T10:02:21.017Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}