Some issue with the Noswhere translation API is bringing down the server:
May 19 06:40:43 purple damus-api[3820026]: undefined:1
May 19 06:40:43 purple damus-api[3820026]: SyntaxError: Unexpected end of JSON input
May 19 06:40:43 purple damus-api[3820026]: at JSON.parse (<anonymous>)
May 19 06:40:43 purple damus-api[3820026]: at parseJSONFromBytes (node:internal/deps/undici/undici:4747:19)
May 19 06:40:43 purple damus-api[3820026]: at successSteps (node:internal/deps/undici/undici:4718:27)
May 19 06:40:43 purple damus-api[3820026]: at fullyReadBody (node:internal/deps/undici/undici:1433:9)
May 19 06:40:43 purple damus-api[3820026]: at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
May 19 06:40:43 purple damus-api[3820026]: at async specConsumeBody (node:internal/deps/undici/undici:4727:7)
May 19 06:40:43 purple damus-api[3820026]: at async #loadTranslationLangs (/nix/store/bymcjkp5z9z7wyf1wml3mnd0kijq8q1c-damus-api-0.1.0/lib/node_modules/damus-api/src/translate/noswhere.js:21:20)
We should:
- Harden this code path so that the whole server is not taken down by this single failure
- Log more details about the issue and the response so that we can more effectively troubleshoot the failure.
Some issue with the Noswhere translation API is bringing down the server:
We should: