Skip to content

Commit 0dc4150

Browse files
authored
fix(replay): Update docs for manually capturing replays for 404 errors (#11262)
1 parent e90c4cc commit 0dc4150

File tree

1 file changed

+4
-7
lines changed
  • docs/platforms/javascript/common/troubleshooting

1 file changed

+4
-7
lines changed

docs/platforms/javascript/common/troubleshooting/index.mdx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ Starting with version `6.7.0` of the JavaScript SDK, you can use the `tunnel` op
128128

129129
To enable the `tunnel` option, provide either a relative or an absolute URL in your `Sentry.init` call. When you use a relative URL, it's relative to the current origin, and this is the form that we recommend. Using a relative URL will not trigger a preflight CORS request, so no events will be blocked, because the ad-blocker will not treat these events as third-party requests.
130130

131-
132131
```javascript
133132
Sentry.init({
134133
dsn: "___PUBLIC_DSN___",
@@ -339,14 +338,12 @@ document.body.addEventListener(
339338
if (!event.target) return;
340339

341340
if (event.target.tagName === "IMG") {
342-
Sentry.captureMessage(
343-
`Failed to load image: ${event.target.src}`,
344-
"warning"
341+
Sentry.captureException(
342+
new Error(`Failed to load image: ${event.target.src}`)
345343
);
346344
} else if (event.target.tagName === "LINK") {
347-
Sentry.captureMessage(
348-
`Failed to load css: ${event.target.href}`,
349-
"warning"
345+
Sentry.captureException(
346+
new Error(`Failed to load css: ${event.target.href}`)
350347
);
351348
}
352349
},

0 commit comments

Comments
 (0)