diff --git a/openvidu-node-client/src/Session.ts b/openvidu-node-client/src/Session.ts index 12cd7e01..5a7affbb 100644 --- a/openvidu-node-client/src/Session.ts +++ b/openvidu-node-client/src/Session.ts @@ -126,10 +126,10 @@ export class Session { // The request was made but no response was received // `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)); } }); }); @@ -169,10 +169,10 @@ export class Session { // The request was made but no response was received // `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)); } }); }); @@ -217,10 +217,10 @@ export class Session { // The request was made but no response was received // `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)); } }); }); @@ -284,10 +284,10 @@ export class Session { // The request was made but no response was received // `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)); } }); }); @@ -337,10 +337,10 @@ export class Session { // The request was made but no response was received // `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)); } }); }); @@ -397,10 +397,10 @@ export class Session { // The request was made but no response was received // `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)); } }); });