We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d488511 commit 10333f7Copy full SHA for 10333f7
packages/app-backend-api/src/hooks.ts
@@ -29,8 +29,13 @@ export class DevtoolsHookable implements Hookable<BackendContext> {
29
if (this.handlers[eventType]) {
30
const handlers = this.handlers[eventType] as HookHandlerData<HookPayloads[T]>[]
31
for (let i = 0; i < handlers.length; i++) {
32
- const { handler } = handlers[i]
33
- await handler(payload, ctx)
+ const { handler, plugin } = handlers[i]
+ try {
34
+ await handler(payload, ctx)
35
+ } catch (e) {
36
+ console.error(`An error occured in hook ${eventType}${plugin ? ` registered by plugin ${plugin.descriptor.id}` : ''}`)
37
+ console.error(e)
38
+ }
39
}
40
41
return payload
0 commit comments