You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not an expert with NestJS, so I'm not sure how to resolve this issue:
I would like to intercept the exceptions thrown by method decorated by @OnEvent.
Every exception thrown by the the http controller are well captured by your lib, but not the @OnEvent methods.
Thanks 🙏
The text was updated successfully, but these errors were encountered:
Looking at @nestjs/event-emitter code/docs I'm not sure if this is possible ti implement with "interceptors" as we do now. I can't find any reference that Interceptors (or enhancers in general) can be applied to the @OnEvent.
But, we could still support this use case. But we would have to introduce something like @Raven(options) (or some other name) decorator which would have to be applied to every @OnEvent method.
Example:
@Raven()
@OnEvent('order.created')handleOrderCreatedEvent(payload: OrderCreatedEvent){// handle and process "OrderCreatedEvent" event}
I'm willing to support anyone wanting to start working on this feature. This would be an implementation of ordinary typescript decorator that would wrap the method and call captureException method if error happened. The captureException method might have to be moved outside of class to be able to call it.
Hi and thank you for your library.
I'm not an expert with NestJS, so I'm not sure how to resolve this issue:
I would like to intercept the exceptions thrown by method decorated by
@OnEvent
.Every exception thrown by the the http controller are well captured by your lib, but not the
@OnEvent
methods.Thanks 🙏
The text was updated successfully, but these errors were encountered: