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

Hook for catching errors #1152

Closed
pi0 opened this issue Apr 17, 2023 · 3 comments
Closed

Hook for catching errors #1152

pi0 opened this issue Apr 17, 2023 · 3 comments
Labels
discussion enhancement New feature or request

Comments

@pi0
Copy link
Member

pi0 commented Apr 17, 2023

Related nuxt/nuxt#20113

A hook like error or nitro:error within plugins could be particularly useful.

Requirements:

  • Hook should be non-blocking
  • Hook should allow accessing event context but prevent to modify / end response
@MateiNenciu
Copy link

I believe it it should be in core already :D but till then, what is the best way to treat nitro errors?

@maou-shonen
Copy link
Contributor

maou-shonen commented Apr 23, 2023

related unjs/h3#377

Capturing errors from external packages is a common use case,
In addition to onError, adding a onRawError handle other package errors is is convenient.

@DrJume
Copy link

DrJume commented Aug 30, 2023

done? #1463

@pi0 pi0 closed this as completed Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants