mirror of https://github.com/OpenVidu/openvidu.git
reject connection failures in Session.ts
parent
b2ec6a00e7
commit
0cddbbf745
|
@ -127,9 +127,11 @@ export class Session {
|
|||
// `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));
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -170,9 +172,11 @@ export class Session {
|
|||
// `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));
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -218,9 +222,11 @@ export class Session {
|
|||
// `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));
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -285,9 +291,11 @@ export class Session {
|
|||
// `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));
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -338,9 +346,11 @@ export class Session {
|
|||
// `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));
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -398,9 +408,11 @@ export class Session {
|
|||
// `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