-
Hi. I need to await my function inside of app.onError(). But i cant make my function async so it doesnt work. Can we use async function in it or any other ideas ? |
Beta Was this translation helpful? Give feedback.
Answered by
yusukebe
Jun 6, 2023
Replies: 2 comments
-
one idea i would have is to use a middleware and just rethrow the error: app.use("*", async (c, next) => {
try {
await next();
} catch (err) {
await something();
throw err;
}
}); |
Beta Was this translation helpful? Give feedback.
0 replies
-
It's implemented, resolved! |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
yusukebe
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's implemented, resolved!