Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing afterReponse hook when an error happens #2560

Open
huang-julien opened this issue Jun 24, 2024 · 1 comment
Open

Missing afterReponse hook when an error happens #2560

huang-julien opened this issue Jun 24, 2024 · 1 comment

Comments

@huang-julien
Copy link
Contributor

huang-julien commented Jun 24, 2024

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 called

Describe the bug

There's a bug where throwing error in handlers prevent the afterResponse from being called.

Additional context

No response

Logs

No response

@huang-julien
Copy link
Contributor Author

Upstream issue from unjs/h3#790

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant