mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-14 11:05:41 +05:00
Clean unnecessary error log
This commit is contained in:
parent
91adf31ff5
commit
399d50e941
@ -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;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user