mirror of
https://github.com/tenrok/axios.git
synced 2026-06-20 20:00:40 +03:00
fix(fetch): fixed ERR_NETWORK mapping for Safari browsers; (#6767)
This commit is contained in:
@@ -213,7 +213,7 @@ export default isFetchSupported && (async (config) => {
|
|||||||
} catch (err) {
|
} catch (err) {
|
||||||
unsubscribe && unsubscribe();
|
unsubscribe && unsubscribe();
|
||||||
|
|
||||||
if (err && err.name === 'TypeError' && /fetch/i.test(err.message)) {
|
if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {
|
||||||
throw Object.assign(
|
throw Object.assign(
|
||||||
new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request),
|
new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request),
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user