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.
This commit is contained in:
Robert Schäfer 2025-06-07 02:42:19 +08:00
parent f3788b84a5
commit e52cb5bee7

View File

@ -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))
}