From b4f4f4b0173737c635a8b45e8aee1ca1f5c67bef Mon Sep 17 00:00:00 2001 From: ChrisChrome Date: Mon, 13 May 2024 12:33:33 -0600 Subject: [PATCH] Update error handling in index.js --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 793ae4d..4962622 100644 --- a/index.js +++ b/index.js @@ -1171,7 +1171,7 @@ process.on("unhandledRejection", (error, promise) => { fs.mkdirSync("./error"); } // write ./error/rejection_timestamp.txt - fs.writeFileSync(`./error/rejection_${Date.now()}.txt`, `ERROR:\n${error}\n\nPROMISE:\n${promise}`); + fs.writeFileSync(`./error/rejection_${Date.now()}.txt`, `ERROR:\n${error}\n\nPROMISE:\n${JSON.stringify(promise)}`); return; });