Commit 862359b
fix(replay): Capture aborted/errored fetch requests in replay network tab (#20722)
Fetch requests that are aborted or fail before receiving response
headers never appear in the replay network tab. Reproducible by calling
`fetch()` with an `AbortController` that fires before headers arrive.
With this setup the request shows up in Sentry breadcrumbs (on the error
objects) but is missing from the replay network tab.
`_isFetchHint()` gates on `hint.response` existing, but when a fetch
errors or is aborted the breadcrumb handler in the breadcrumb
integration creates a hint with the error as `data` and no `response`
(since none was received). Changed the guard to check `hint.input`
instead, which is always present.
Closes #20714
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent e9791d3 commit 862359b
2 files changed
Lines changed: 52 additions & 2 deletions
File tree
- packages/replay-internal
- src/coreHandlers
- test/unit/coreHandlers
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
99 | | - | |
| 98 | + | |
| 99 | + | |
100 | 100 | | |
Lines changed: 50 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
359 | 359 | | |
360 | 360 | | |
361 | 361 | | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
362 | 412 | | |
363 | 413 | | |
364 | 414 | | |
| |||
0 commit comments