Disable keepalive
for error fetch requests
#7546
Labels
Package: core
Issues related to the Sentry Core SDK
Uh oh!
There was an error while loading. Please reload this page.
We have introduced
keepalive
in #5697. However, there have been some reports (e.g. #6049) that users have pending HTTP requests, probably due to this.We should set this flag to
false
for error events, and only set this flag for replays and transactions, as they have the characteristic:For errors, in contrast, you can have many at the same time, and it's not so likely to have (relevant) errors right before a page is switched.
This is IMHO the best tradeoff overall.
Reproduction
We could reproduce this with the following code:
Some of the sentry request will remain
pending
forever in Chrome.note that other fetch requests to other domains do go through. Still, this is not ideal.
Observations
The text was updated successfully, but these errors were encountered: