chore(event-bus): event bus error handling (#10085)

This commit is contained in:
Carlos R. L. Rodrigues
2024-11-13 18:03:29 -03:00
committed by GitHub
parent 98bf8c9006
commit 3e265229f2
9 changed files with 78 additions and 56 deletions

View File

@@ -143,10 +143,11 @@ export default class LocalEventBusService extends AbstractEventBusModuleService
this.eventEmitter_.on(event, async (data: Event) => {
try {
await subscriber(data)
} catch (e) {
} catch (err) {
this.logger_?.error(
`An error occurred while processing ${event.toString()}: ${e}`
`An error occurred while processing ${event.toString()}:`
)
this.logger_?.error(err)
}
})
return this