log an error with a channel if we try to pin an invalid channel

This commit is contained in:
ansuz 2021-08-12 19:08:18 +05:30
parent 6413be24f3
commit 8d17ae64f3
1 changed files with 1 additions and 0 deletions

View File

@ -134,6 +134,7 @@ var factory = function (Util, Rpc) {
exp.removeOwnedChannel = function (channel, cb) {
if (typeof(channel) !== 'string' || [32,48].indexOf(channel.length) === -1) {
// can't use this on files because files can't be owned...
console.error('invalid channel to unpin', channel);
return void cb('INVALID_ARGUMENTS');
}
rpc.send('REMOVE_OWNED_CHANNEL', channel, function (e, response) {