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
|
// `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));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -705,4 +707,4 @@ export class OpenVidu {
|
||||||
return this.o.activeSessions;
|
return this.o.activeSessions;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue