We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
errorHandler
1 parent 65d9150 commit ca90331Copy full SHA for ca90331
packages/replay-canvas/src/canvas.ts
@@ -73,7 +73,20 @@ export const _replayCanvasIntegration = ((options: Partial<ReplayCanvasOptions>
73
enableManualSnapshot,
74
recordCanvas: true,
75
getCanvasManager: (options: CanvasManagerOptions) => {
76
- const manager = new CanvasManager({ ...options, enableManualSnapshot });
+ const manager = new CanvasManager({
77
+ ...options,
78
+ enableManualSnapshot,
79
+ errorHandler: (err: unknown) => {
80
+ try {
81
+ if (typeof err === 'object') {
82
+ (err as Error & { __rrweb__?: boolean }).__rrweb__ = true;
83
+ }
84
+ } catch (error) {
85
+ // ignore errors here
86
+ // this can happen if the error is frozen or does not allow mutation for other reasons
87
88
+ },
89
+ });
90
canvasManagerResolve(manager);
91
return manager;
92
},
0 commit comments