{"record":{"id":"e033abaaa8000ea9","repo":"Mintplex-Labs/anything-llm","slug":"not-found-e033ab","errorCode":null,"errorMessage":"Not Found","messagePattern":"Not Found","errorType":"http","errorClass":null,"httpStatus":404,"severity":"error","filePath":"server/endpoints/system.js","lineNumber":577,"sourceCode":"    async (_, response) => {\n      try {\n        const online = await new CollectorApi().online();\n        response.sendStatus(online ? 200 : 503);\n      } catch (e) {\n        console.error(e.message, e);\n        response.sendStatus(500).end();\n      }\n    }\n  );\n\n  app.get(\n    \"/system/accepted-document-types\",\n    [validatedRequest],\n    async (_, response) => {\n      try {\n        const types = await new CollectorApi().acceptedFileTypes();\n        if (!types) {\n          response.sendStatus(404).end();\n          return;\n        }\n\n        response.status(200).json({ types });\n      } catch (e) {\n        console.error(e.message, e);\n        response.sendStatus(500).end();\n      }\n    }\n  );\n\n  app.post(\n    \"/system/update-env\",\n    [validatedRequest, flexUserRoleValid([ROLES.admin])],\n    async (request, response) => {\n      try {\n        const body = reqBody(request);\n        const { newValues, error } = await updateENV(","sourceCodeStart":559,"sourceCodeEnd":595,"githubUrl":"https://github.com/Mintplex-Labs/anything-llm/blob/3aec848f2885144aa8f1e53b9731a04310d5d558/server/endpoints/system.js#L559-L595","documentation":"This 404 'Not Found' from GET /system/accepted-document-types (server/endpoints/system.js:577) is a deliberate mapping, not a thrown exception. The handler calls CollectorApi().acceptedFileTypes(), which fetches http://0.0.0.0:8888/accepts on the document collector (python) service; its internal .catch returns null on any failure - ECONNREFUSED, wrong COLLECTOR_PORT, non-OK response - and the endpoint converts that null into 404. In short: 404 here means the document processor/collector is unreachable, not that a route is missing.","triggerScenarios":"GET /api/system/accepted-document-types while the collector container is stopped or crashed; COLLECTOR_PORT set to a value the collector is not listening on; collector still booting (its model/OCR imports are slow) when the frontend loads the upload dialog.","commonSituations":"Docker compose deployments where the collector sidecar exited (check docker logs on the collector); dev setups running only `node server/index.js` without the python collector; port conflicts on 8888.","solutions":["Check the collector service: docker ps / docker logs <collector> - restart it if exited","Verify COLLECTOR_PORT is identical in server and collector environments","Retry after the collector finishes booting - it exposes /accepts only once ready","From inside the server container, curl http://0.0.0.0:8888/accepts to confirm reachability"],"exampleFix":"// before (client assumes 404 = bad route)\nconst res = await fetch(\"/api/system/accepted-document-types\");\nif (res.status === 404) console.error(\"route missing\");\n\n// after (404 = collector offline)\nconst res = await fetch(\"/api/system/accepted-document-types\");\nif (res.status === 404) {\n  showBanner(\"Document processor offline - uploads disabled until it restarts\");\n}","handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  const res = await fetch(\"/api/system/accepted-document-types\", { headers: authHeaders() });\n  if (res.status === 404) {\n    return FALLBACK_TYPES; // collector offline - fall back to a known-good type list and disable live validation\n  }\n  if (!res.ok) throw new Error(`unexpected status ${res.status}`);\n  return (await res.json()).types;\n} catch (e) {\n  return FALLBACK_TYPES;\n}","preventionTips":["Never interpret this 404 as a missing route - it means the collector service is unreachable","Keep a static fallback list of accepted extensions so upload UIs degrade gracefully","Monitor the collector container with a restart policy so it recovers without manual action","From the server container, curl http://0.0.0.0:8888/accepts to triage reachability quickly"],"tags":["express","collector","document-processing","not-found","service-unavailable"],"backgroundTag":"connection-refused","analyzedSha":"3aec848f2885144aa8f1e53b9731a04310d5d558","analyzedAt":"2026-08-18T10:02:21.017Z","schemaVersion":2},"datasetVersion":"2026-08-30T08:17:16.595Z"}