mirror of https://github.com/OpenVidu/openvidu.git
Merge pull request #203 from oisnot/feature/fetchrejectonaxioserror
Added reject with new Error if OpenVidu fetch failspull/204/head
commit
18b8643cd8
|
@ -483,9 +483,11 @@ export class OpenVidu {
|
||||||
// `error.request` is an instance of XMLHttpRequest in the browser and an instance of
|
// `error.request` is an instance of XMLHttpRequest in the browser and an instance of
|
||||||
// http.ClientRequest in node.js
|
// http.ClientRequest in node.js
|
||||||
console.error(error.request);
|
console.error(error.request);
|
||||||
|
reject(new Error(error.request));
|
||||||
} else {
|
} else {
|
||||||
// Something happened in setting up the request that triggered an Error
|
// Something happened in setting up the request that triggered an Error
|
||||||
console.error('Error', error.message);
|
console.error('Error', error.message);
|
||||||
|
reject(new Error(error.message));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue