mirror of https://github.com/OpenVidu/openvidu.git
Added reject with new Error if OpenVidu fetch fails because of network problems.
parent
d727b3bc7f
commit
0379d288db
|
@ -483,9 +483,11 @@ export class OpenVidu {
|
|||
// `error.request` is an instance of XMLHttpRequest in the browser and an instance of
|
||||
// http.ClientRequest in node.js
|
||||
console.error(error.request);
|
||||
reject(new Error(error.request));
|
||||
} else {
|
||||
// Something happened in setting up the request that triggered an Error
|
||||
console.error('Error', error.message);
|
||||
reject(new Error(error.message));
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue