openvidu-node-client: avoid [object object] error on OpenVidu#fetch

pull/375/head
pabloFuente 2019-09-11 10:33:10 +02:00
parent 8ad13167cd
commit 77bad4e14f
1 changed files with 1 additions and 1 deletions

View File

@ -480,7 +480,7 @@ export class OpenVidu {
// `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));
reject(error);
} else {
// Something happened in setting up the request that triggered an Error
console.error('Error', error.message);