From 1370cd6624f56fb8bb3a7f067762e1772568c9c7 Mon Sep 17 00:00:00 2001 From: buzz-lightsnack-2007 <73412182+buzz-lightsnack-2007@users.noreply.github.com> Date: Tue, 7 May 2024 10:07:04 +0800 Subject: [PATCH] Attempt to fix display of error by setting to string --- scripts/external/processor.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/external/processor.js b/scripts/external/processor.js index e2ca942..bc07213 100644 --- a/scripts/external/processor.js +++ b/scripts/external/processor.js @@ -32,7 +32,12 @@ export default class processor { await this.product.analyze(); } catch(err) { logging.error(err.name, err.message, err.stack, false); - this.product.status[`error`] = err; + + // Convert the error to an object. + this.product.status[`error`] = {}; + [`name`, `message`, `stack`].forEach((KEY) => { + this.product.status.error[KEY] = String(err[KEY]); + }) }; // Indicate that the process is done.