From 2f283f6d48cb016f17b82bd5bd78faefe0b9a41f Mon Sep 17 00:00:00 2001 From: Moe Date: Sun, 7 Jan 2024 11:01:53 -0800 Subject: [PATCH] make backblaze errors not return file buffer with error --- libs/uploaders/backblazeB2.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libs/uploaders/backblazeB2.js b/libs/uploaders/backblazeB2.js index b06294fb..db2d62b0 100644 --- a/libs/uploaders/backblazeB2.js +++ b/libs/uploaders/backblazeB2.js @@ -47,7 +47,9 @@ module.exports = function(s,config,lang){ } var backblazeErr = function(err){ // console.log(err) - s.userLog({mid:'$USER',ke:e.ke},{type:lang['Backblaze Error'],msg:err.stack || err.data || err}) + const msg = err.stack || err.data || err; + delete(msg.data) + s.userLog({mid:'$USER',ke:e.ke},{type:lang['Backblaze Error'],msg: msg}) } async function createB2Connection(){ const b2 = new B2({ @@ -107,6 +109,7 @@ module.exports = function(s,config,lang){ const theGroup = s.group[e.ke] if(theGroup.bb_b2 && theGroup.init.use_bb_b2 !== '0' && theGroup.init.bb_b2_save === '1'){ function backblazeErr(err){ + delete(err.data) s.userLog({mid:'$USER',ke:e.ke},{type:lang['Backblaze Error'],msg:err}) s.debugLog(err) }