If Response() throws when fetch() is trying to resolve it'll throw an error that can't be handled.
This change would catch the error when trying to resolve and instead reject the fetch promise with the error so it can be handled by a catch higher up.
I ran into this issue in a react-native project when a server unpredictably returned a 600 status code, ultimately causing react-native to panic/crash and I was unable to handle the thrown RangeError in any way.
If Response() throws when fetch() is trying to resolve it'll throw an error that can't be handled.
This change would catch the error when trying to resolve and instead reject the fetch promise with the error so it can be handled by a catch higher up.
I ran into this issue in a react-native project when a server unpredictably returned a 600 status code, ultimately causing react-native to panic/crash and I was unable to handle the thrown RangeError in any way.