From e52cb5bee70f9eb5d891d40be092158a0796e9e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=A4fer?= Date: Sat, 7 Jun 2025 02:42:19 +0800 Subject: [PATCH] refactor: display server errors on the logs So, this might clutter our CI but I found it so helpful to turn this on. Our seeds are riddled with runtime errors that we never see. It's also easier to debug the tests if you can see the actual errors thrown by the backend. Let's see how CI log output looks like after this. --- backend/src/server.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/src/server.ts b/backend/src/server.ts index b5f183e32..f0ffadff3 100644 --- a/backend/src/server.ts +++ b/backend/src/server.ts @@ -87,6 +87,8 @@ const createServer = (options?) => { uploads: false, tracing: !!CONFIG.DEBUG, formatError: (error) => { + // eslint-disable-next-line no-console + console.error(error.originalError) if (error.message === 'ERROR_VALIDATION') { return new Error(error.originalError.details.map((d) => d.message)) }