handle logs that cannot be stringified/parsed
This commit is contained in:
parent
a236fd071b
commit
dbb2a63d56
@ -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');
|
||||
|
Loading…
Reference in New Issue
Block a user