From 4d167ee6807a6b712a2004c07e248c0bedc03c8c Mon Sep 17 00:00:00 2001 From: Billy Vong Date: Wed, 9 Aug 2023 00:22:02 -0400 Subject: [PATCH] add error handler --- packages/replay/src/integration.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/replay/src/integration.ts b/packages/replay/src/integration.ts index 5e2b6aaf559b..c31cf5156121 100644 --- a/packages/replay/src/integration.ts +++ b/packages/replay/src/integration.ts @@ -153,6 +153,11 @@ export class Replay implements Integration { // collect fonts, but be aware that `sentry.io` needs to be an allowed // origin for playback collectFonts: true, + errorHandler: (err) => { + // @ts-ignore Accessing unknown property + err.__rrweb__ = true; + return true; + } }; this._initialOptions = {