fix(nuxt): call app:error before throwing in renderer

This commit is contained in:
Julien Huang 2024-07-16 20:54:08 +02:00
parent 48a8b18083
commit 0f56e17988

View File

@ -355,6 +355,7 @@ export default defineRenderHandler(async (event): Promise<Partial<RenderResponse
// Handle errors // Handle errors
if (ssrContext.payload?.error && !ssrError) { if (ssrContext.payload?.error && !ssrError) {
await ssrContext.nuxt?.hooks.callHook('app:error', ssrContext.payload.error)
throw ssrContext.payload.error throw ssrContext.payload.error
} }