Skip to content

Commit

Permalink
fix: always add config to the event payload
Browse files Browse the repository at this point in the history
  • Loading branch information
Yehonal committed Nov 5, 2024
1 parent d6afc43 commit 8df32ce
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions event-manager/src/event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -299,6 +304,7 @@ export function event<
message: optionalMessage,
data,
eventName: formattedEventName,
config,
errorInfo: !_.isEmpty(errorPayload) ? errorPayload : undefined,
};

Expand Down

0 comments on commit 8df32ce

Please sign in to comment.