Added error message to ice servers fetch fail

This commit is contained in:
Mitchell McCaffrey 2020-11-26 18:55:27 +11:00
parent 11116e8686
commit 700434a50c

View File

@ -74,7 +74,7 @@ class Session extends EventEmitter {
try { try {
const response = await fetch(process.env.REACT_APP_ICE_SERVERS_URL); const response = await fetch(process.env.REACT_APP_ICE_SERVERS_URL);
if (!response.ok) { if (!response.ok) {
throw Error(); throw Error("Unable to fetch ICE servers");
} }
const data = await response.json(); const data = await response.json();
this._iceServers = data.iceServers; this._iceServers = data.iceServers;