Open huang-julien opened 3 months ago
windows 11 nitro 2.9.6 h3 1.11 - 1.12
https://stackblitz.com/edit/unjs-nitro-starter-bbtnhb?file=server%2Froutes%2Fthrow.ts,server%2Froutes%2Findex.ts,server%2Fplugins%2Flog.ts,package.json&title=Nitro%20Starter
index return an error and /throw throws an error. In both case, afterResponse isn't called
afterResponse
There's a bug where throwing error in handlers prevent the afterResponse from being called.
No response
Upstream issue from https://github.com/unjs/h3/issues/790
Environment
windows 11 nitro 2.9.6 h3 1.11 - 1.12
Reproduction
https://stackblitz.com/edit/unjs-nitro-starter-bbtnhb?file=server%2Froutes%2Fthrow.ts,server%2Froutes%2Findex.ts,server%2Fplugins%2Flog.ts,package.json&title=Nitro%20Starter
index return an error and /throw throws an error. In both case,
afterResponse
isn't calledDescribe the bug
There's a bug where throwing error in handlers prevent the
afterResponse
from being called.Additional context
No response
Logs
No response