From 2ac9c3ba66585b5526fceeaf5bc0bb2583786938 Mon Sep 17 00:00:00 2001 From: yflory Date: Fri, 16 Feb 2018 12:33:33 +0100 Subject: [PATCH] Report RPC errors when deleting owned pads --- www/common/outer/userObject.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/www/common/outer/userObject.js b/www/common/outer/userObject.js index 70a8445f7..12d6d225e 100644 --- a/www/common/outer/userObject.js +++ b/www/common/outer/userObject.js @@ -3,8 +3,9 @@ define([ '/common/common-util.js', '/common/common-hash.js', '/common/common-realtime.js', + '/common/common-feedback.js', '/customize/messages.js' -], function (AppConfig, Util, Hash, Realtime, Messages) { +], function (AppConfig, Util, Hash, Realtime, Feedback, Messages) { var module = {}; var clone = function (o) { @@ -102,7 +103,12 @@ define([ if (!isOwnPadRemoved && fd.owners && fd.owners.indexOf(edPublic) !== -1 && channelId) { removeOwnedChannel(channelId, function (obj) { - if (obj && obj.error) { console.error(obj.error); } + if (obj && obj.error) { + console.error(obj.error); + // RPC may not be responding + // Send a report that can be handled manually + Feedback.send('ERROR_DELETING_OWNED_PAD=' + channelId, true); + } }); } if (channelId) { toClean.push(channelId); }