From 8df32cefb89c7f4124d5a43e32f92fb06a552b0b Mon Sep 17 00:00:00 2001 From: Yehonal Date: Tue, 5 Nov 2024 16:03:12 +0100 Subject: [PATCH] fix: always add config to the event payload --- event-manager/src/event.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/event-manager/src/event.ts b/event-manager/src/event.ts index cfbddb4..9fa6110 100644 --- a/event-manager/src/event.ts +++ b/event-manager/src/event.ts @@ -47,6 +47,11 @@ export interface IEventPayload { */ data?: IDataInfo; eventName: string; + config?: any; + /** + * This is used to log the error information. + * NOTE: eventName and config are redundant here. + */ errorInfo?: IErrorPayload; } @@ -299,6 +304,7 @@ export function event< message: optionalMessage, data, eventName: formattedEventName, + config, errorInfo: !_.isEmpty(errorPayload) ? errorPayload : undefined, };