We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
onError
1 parent 1552219 commit 2c25aa1Copy full SHA for 2c25aa1
1 file changed
src/app.ts
@@ -61,11 +61,12 @@ export function createApp (options: AppOptions = {}): App {
61
} catch (err) {
62
if (options.onError) {
63
await options.onError(err as Error, event)
64
+ } else {
65
+ if (!isError(err)) {
66
+ console.error('[h3]', err) // eslint-disable-line no-console
67
+ }
68
+ await sendError(event, err as Error, !!options.debug)
69
}
- if (!isError(err)) {
- console.error('[h3]', err) // eslint-disable-line no-console
- }
- await sendError(event, err as Error, !!options.debug)
70
71
72
0 commit comments