From fbcd5cb5e8d39a0e1b99726808fc5cf6428c4822 Mon Sep 17 00:00:00 2001 From: Irwan Cahyono Date: Fri, 8 Aug 2025 00:16:58 +0700 Subject: [PATCH] error --- nuxt.config.ts | 4 ++++ plugins/error-handler.ts | 5 +++++ 2 files changed, 9 insertions(+) create mode 100644 plugins/error-handler.ts diff --git a/nuxt.config.ts b/nuxt.config.ts index 1f04bf9..5e4800a 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -73,5 +73,9 @@ export default defineNuxtConfig({ }, ssr: false, + + nitro: { + logLevel: 'debug' + }, }); \ No newline at end of file diff --git a/plugins/error-handler.ts b/plugins/error-handler.ts new file mode 100644 index 0000000..e8293b1 --- /dev/null +++ b/plugins/error-handler.ts @@ -0,0 +1,5 @@ +export default defineNitroPlugin((nitroApp) => { + nitroApp.hooks.hook('error', (error, event) => { + console.error('[Nitro Error]', error) + }) +}) \ No newline at end of file