From dbb2a63d5666ef03e2d62dbf1908b527ee5af56b Mon Sep 17 00:00:00 2001 From: Anton Georgiev <anto.georgiev@gmail.com> Date: Wed, 5 Dec 2018 21:38:19 +0000 Subject: [PATCH] handle logs that cannot be stringified/parsed --- .../imports/ui/components/join-handler/component.jsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bigbluebutton-html5/imports/ui/components/join-handler/component.jsx b/bigbluebutton-html5/imports/ui/components/join-handler/component.jsx index 433be3f486..de55745664 100644 --- a/bigbluebutton-html5/imports/ui/components/join-handler/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/join-handler/component.jsx @@ -101,7 +101,14 @@ class JoinHandler extends Component { .then((resp) => { setLogoutURL(resp.logoutURL); if (resp.returncode !== 'FAILED') { - logger.info(`User successfully went through main.joinRouteHandler with [${JSON.stringify(resp)}].`); + let logString; + try { + logString = JSON.stringify(resp); + } catch (e) { + logger.error(`Could not stringify object ${resp}`) + logString = resp; + } + logger.info(`User successfully went through main.joinRouteHandler with [${logString}].`); return resolve(resp); } const e = new Error('Session not found'); -- GitLab