From 399d50e9410b8366b4175f0b9f173d96fbcfed2a Mon Sep 17 00:00:00 2001 From: yflory Date: Wed, 13 Sep 2023 17:46:00 +0200 Subject: [PATCH] Clean unnecessary error log --- lib/hk-util.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/hk-util.js b/lib/hk-util.js index 81fc4c16e..09839e12c 100644 --- a/lib/hk-util.js +++ b/lib/hk-util.js @@ -199,10 +199,7 @@ const getMetadata = HK.getMetadata = function (Env, channelName, _cb) { } MetaRPC.getMetadataRaw(Env, channelName, function (err, metadata) { - if (err) { - console.error(err); - return void cb(err); - } + if (err) { return void cb(err); } if (!(metadata && typeof(metadata.channel) === 'string' && metadata.channel.length === STANDARD_CHANNEL_LENGTH)) { return cb(); } @@ -705,7 +702,7 @@ const handleGetHistory = function (Env, Server, seq, userId, parsed) { stack: err && err.stack, }); } // FIXME err.message isn't useful for users - const parsedMsg = {error:err.message, test:'a', channel: channelName, txid: txid}; + const parsedMsg = {error:err.message, channel: channelName, txid: txid}; Server.send(userId, [0, HISTORY_KEEPER_ID, 'MSG', userId, JSON.stringify(parsedMsg)]); return; } @@ -726,7 +723,7 @@ const handleGetHistory = function (Env, Server, seq, userId, parsed) { is no longer on the server so they don't abuse the data and so that they don't unintentionally continue to edit it in a broken state. */ - const parsedMsg2 = {error:'EDELETED', test:'b',channel: channelName, txid: txid}; + const parsedMsg2 = {error:'EDELETED', channel: channelName, txid: txid}; Server.send(userId, [0, HISTORY_KEEPER_ID, 'MSG', userId, JSON.stringify(parsedMsg2)]); return; }