diff --git a/apps/platform/src/error/SentryProvider.ts b/apps/platform/src/error/SentryProvider.ts index 06cfabfa..b58a48a4 100644 --- a/apps/platform/src/error/SentryProvider.ts +++ b/apps/platform/src/error/SentryProvider.ts @@ -25,7 +25,9 @@ export default class SentryProvider implements ErrorHandlingProvider { }) } - notify(error: Error) { - Sentry.captureException(error) + notify(error: Error, context?: Record) { + Sentry.captureException(error, { + extra: context, + }) } } diff --git a/apps/platform/src/providers/MessageTriggerService.ts b/apps/platform/src/providers/MessageTriggerService.ts index 663da7db..24763bc5 100644 --- a/apps/platform/src/providers/MessageTriggerService.ts +++ b/apps/platform/src/providers/MessageTriggerService.ts @@ -193,7 +193,7 @@ export const failSend = async ({ campaign, user, context }: MessageTriggerHydrat } // Notify of the error if it's a critical one - if (error && shouldNotify(error)) App.main.error.notify(error) + if (error && shouldNotify(error)) App.main.error.notify(error, context) } export const finalizeSend = async (data: MessageTriggerHydrated, result: any) => {