Skip to content

Commit 471f1e8

Browse files
authored
fix(replay): Fix beforeErrorSampling example (#12441)
1 parent eeae4b7 commit 471f1e8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

docs/platforms/javascript/common/session-replay/understanding-sessions.mdx

+3-2
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,9 @@ If you want to skip capturing a Replay for certain errors, you can use the `befo
190190

191191
```javascript
192192
replayIntegration({
193-
beforeErrorSampling: (error) => {
194-
return error.message?.includes("drop me");
193+
beforeErrorSampling: (event) => {
194+
// Return false to skip capturing a Replay for this error
195+
return !event.exception?.values?.[0]?.message?.includes("drop me");
195196
},
196197
});
197198
```

0 commit comments

Comments
 (0)