-
Notifications
You must be signed in to change notification settings - Fork 48
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
feat(listener): support custom error handler #131
Conversation
Signed-off-by: Marc MacLeod <[email protected]>
Hi @marbemac ! This is an awesome feature! I have been wanting a feature like this. Please check my comments. Also, please add proper tests. Thanks. |
Signed-off-by: Marc MacLeod <[email protected]>
Signed-off-by: Marc MacLeod <[email protected]>
Signed-off-by: Marc MacLeod <[email protected]> # Conflicts: # src/listener.ts
Hi @yusukebe - alrighty, I've adjusted the function signature to accept the options object, and added some tests. LMK if the code style / test style works for you, or if you'd like any other changes! |
Signed-off-by: Marc MacLeod <[email protected]>
Hi @marbemac Please run: yarn lint:fix && yarn format:fix |
Signed-off-by: Marc MacLeod <[email protected]>
done |
Greeeat! I'll merge it and ship the new version. Thanks! |
Would ya'll be open to this kind of option?
Open to alternative approaches, but basically what I'm after is a means for the consumer to be able to provide it's own error handler so that it can, for example, pass the error down the middleware chain in a Vite dev server. This allows vite to display the standard pretty error overlay on the client, etc.
See example of how it can be used in honojs/vite-plugins#63 (this PR blocks that PR).