mirror of
https://fast.feibisi.com/https://github.com/parcelvoy/platform.git
synced 2025-08-28 11:46:02 +08:00
Adds additional context to true send errors (#667)
This commit is contained in:
parent
02b0b4f1aa
commit
3d59d28fff
2 changed files with 5 additions and 3 deletions
|
@ -25,7 +25,9 @@ export default class SentryProvider implements ErrorHandlingProvider {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
notify(error: Error) {
|
notify(error: Error, context?: Record<string, any>) {
|
||||||
Sentry.captureException(error)
|
Sentry.captureException(error, {
|
||||||
|
extra: context,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -193,7 +193,7 @@ export const failSend = async ({ campaign, user, context }: MessageTriggerHydrat
|
||||||
}
|
}
|
||||||
|
|
||||||
// Notify of the error if it's a critical one
|
// 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<TemplateType>, result: any) => {
|
export const finalizeSend = async (data: MessageTriggerHydrated<TemplateType>, result: any) => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue