Throw error when ice servers responds not ok
This commit is contained in:
parent
3fc8c98862
commit
11116e8686
@ -73,6 +73,9 @@ class Session extends EventEmitter {
|
||||
async connect() {
|
||||
try {
|
||||
const response = await fetch(process.env.REACT_APP_ICE_SERVERS_URL);
|
||||
if (!response.ok) {
|
||||
throw Error();
|
||||
}
|
||||
const data = await response.json();
|
||||
this._iceServers = data.iceServers;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user