Clean unnecessary error log

This commit is contained in:
yflory 2023-09-13 17:46:00 +02:00
parent 91adf31ff5
commit 399d50e941

View File

@ -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;
}