-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(browser): Handle case where fetch can be undefined #5973
Conversation
size-limit report 📦
|
}, | ||
})); | ||
} catch (e) { | ||
return rejectedSyncPromise(e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am wondering what the long term outcome of this change is... If we go forward with this, we will probably just hide the fact that fetch
is undefined
behind a network error
client report. Is that what we want?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes this is tricky. I also realized that this change means we don't respect rate-limiting on the SDK at all...
Even if we hide this behind weird client outcomes, let's still ship this so folks get unblocked. |
fixes #5792.
Some users reported cases where the
nativeFetch
call was returning undefined. I have no idea how this happens, but in order for us to not send unnecessary errors to Sentry, let's be a little defensive in the usage of fetch.