Skip to content

Commit

Permalink
feat(api): log hook payload in error
Browse files Browse the repository at this point in the history
  • Loading branch information
Akryum committed Feb 14, 2022
1 parent 1484c45 commit cda3523
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/app-backend-api/src/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export class DevtoolsHookable implements Hookable<BackendContext> {
try {
await handler(payload, ctx)
} catch (e) {
console.error(`An error occurred in hook ${eventType}${plugin ? ` registered by plugin ${plugin.descriptor.id}` : ''}`)
console.error(`An error occurred in hook '${eventType}'${plugin ? ` registered by plugin '${plugin.descriptor.id}'` : ''} with payload:`, payload)
console.error(e)
}
}
Expand Down

0 comments on commit cda3523

Please sign in to comment.