diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js index 4efd3b8cf3..b30bc2f986 100644 --- a/chrome/content/zotero/xpcom/zotero.js +++ b/chrome/content/zotero/xpcom/zotero.js @@ -1373,7 +1373,12 @@ Services.scriptloader.loadSubScript("resource://zotero/polyfill.js"); } if (asStrings) { - errors.push(altMessage || msg.message) + let message = altMessage || msg.message; + // Stringify exceptions object instead of just returning "Object" + if (message.includes('uncaught exception: Object') && typeof msg.exception == "object") { + message = "[JavaScript Error:" + JSON.stringify(msg.exception); + } + errors.push(message); } else { errors.push(msg);