Improve unhandled promise error logging

pull/1274/head
Mikunj 5 years ago
parent d943a9401b
commit 258b406b9e

@ -136,7 +136,7 @@ window.onerror = (message, script, line, col, error) => {
}; };
window.addEventListener('unhandledrejection', rejectionEvent => { window.addEventListener('unhandledrejection', rejectionEvent => {
window.log.error( const error = rejectionEvent.reason;
`Top-level unhandled promise rejection: ${rejectionEvent.reason}` const errorInfo = error && error.stack ? error.stack : JSON.stringify(error);
); window.log.error(`Top-level unhandled promise rejection: ${errorInfo}`);
}); });

@ -32,7 +32,7 @@ window.Signal = {
Components: { Components: {
SessionPasswordPrompt, SessionPasswordPrompt,
}, },
} };
window.CONSTANTS = { window.CONSTANTS = {
MAX_LOGIN_TRIES: 3, MAX_LOGIN_TRIES: 3,

Loading…
Cancel
Save