From 6a155597ce6a0b8971faf2f7b0224a9c735949f7 Mon Sep 17 00:00:00 2001 From: smueller Date: Wed, 22 Jul 2026 14:06:12 +0200 Subject: [PATCH] Remove console error suppression in toApiErrorResponse for improved error logging --- apps/webui/src/lib/auth.ts | 1 - apps/webui/vitest.config.ts | 22 ++++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 apps/webui/vitest.config.ts diff --git a/apps/webui/src/lib/auth.ts b/apps/webui/src/lib/auth.ts index 6310cc8..f375e8f 100644 --- a/apps/webui/src/lib/auth.ts +++ b/apps/webui/src/lib/auth.ts @@ -93,7 +93,6 @@ export function toApiErrorResponse(error: unknown): NextResponse { { status: 400 } ); } - // eslint-disable-next-line no-console console.error('[api]', error); return NextResponse.json({ error: 'Internal server error' }, { status: 500 }); } diff --git a/apps/webui/vitest.config.ts b/apps/webui/vitest.config.ts new file mode 100644 index 0000000..d55efcb --- /dev/null +++ b/apps/webui/vitest.config.ts @@ -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') + } + } +});