openvidu-browser: extend error logs to avoid empty objects

pull/634/head
pabloFuente 2021-06-21 12:54:29 +02:00
parent 35238a3390
commit 1e4472f89d
3 changed files with 3 additions and 3 deletions

View File

@ -496,7 +496,7 @@ export class Publisher extends StreamManager {
}; };
const getMediaError = error => { const getMediaError = error => {
logger.error(error); logger.error(`getMediaError: ${JSON.stringify(error)}`);
this.clearPermissionDialogTimer(startTime, timeForDialogEvent); this.clearPermissionDialogTimer(startTime, timeForDialogEvent);
if (error.name === 'Error') { if (error.name === 'Error') {
// Safari OverConstrainedError has as name property 'Error' instead of 'OverConstrainedError' // Safari OverConstrainedError has as name property 'Error' instead of 'OverConstrainedError'

View File

@ -1171,7 +1171,7 @@ export class Session extends EventDispatcher {
if (!this.connection.disposed && !forced) { if (!this.connection.disposed && !forced) {
this.openvidu.sendRequest('leaveRoom', (error, response) => { this.openvidu.sendRequest('leaveRoom', (error, response) => {
if (error) { if (error) {
logger.error(error); logger.error(`leaveRoom error: ${JSON.stringify(error)}`);
} }
this.openvidu.closeWs(); this.openvidu.closeWs();
}); });

View File

@ -304,7 +304,7 @@ export class WebRtcStats {
await fetch(url, configuration); await fetch(url, configuration);
} catch (error) { } catch (error) {
logger.error(error); logger.error(`sendStats error: ${JSON.stringify(error)}`);
} }
} }