Remove console error suppression in toApiErrorResponse for improved error logging

This commit is contained in:
smueller
2026-07-22 14:06:12 +02:00
parent 4fcbe38b56
commit 6a155597ce
2 changed files with 22 additions and 1 deletions

View File

@@ -93,7 +93,6 @@ export function toApiErrorResponse(error: unknown): NextResponse {
{ status: 400 } { status: 400 }
); );
} }
// eslint-disable-next-line no-console
console.error('[api]', error); console.error('[api]', error);
return NextResponse.json({ error: 'Internal server error' }, { status: 500 }); return NextResponse.json({ error: 'Internal server error' }, { status: 500 });
} }

View File

@@ -0,0 +1,22 @@
import path from 'path';
import { defineConfig } from 'vitest/config';
export default defineConfig({
// Avoid Vite trying to load the Next.js-flavored postcss.config.mjs
// (array-of-strings plugin syntax), which the standalone PostCSS loader
// used by Vite/Vitest cannot parse. None of our unit tests need CSS.
css: {
postcss: {
plugins: []
}
},
test: {
environment: 'node',
css: false
},
resolve: {
alias: {
'@': path.resolve(__dirname, './src')
}
}
});