From 2eef1e96e60f9104d9c8213aa94e1a1f40c7c0a9 Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 20 Feb 2018 10:21:15 +0100 Subject: [PATCH] Remove invalid error reports --- www/common/outer/userObject.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/www/common/outer/userObject.js b/www/common/outer/userObject.js index 12d6d225e..dadbfb463 100644 --- a/www/common/outer/userObject.js +++ b/www/common/outer/userObject.js @@ -104,9 +104,13 @@ define([ fd.owners && fd.owners.indexOf(edPublic) !== -1 && channelId) { removeOwnedChannel(channelId, function (obj) { if (obj && obj.error) { - console.error(obj.error); + // If the error is that the file is already removed, nothing to + // report, it's a normal behavior (pad expired probably) + if (obj.error.code === 'ENOENT') { return; } + // RPC may not be responding // Send a report that can be handled manually + console.error(obj.error); Feedback.send('ERROR_DELETING_OWNED_PAD=' + channelId, true); } });