diff --git a/lib/commands/pin-rpc.js b/lib/commands/pin-rpc.js index 16998b8b5..663faa58b 100644 --- a/lib/commands/pin-rpc.js +++ b/lib/commands/pin-rpc.js @@ -199,7 +199,8 @@ Pinning.removePins = function (Env, safeKey, cb) { status: err? String(err): 'SUCCESS', }); - cb(err); + if (err) { return void cb(err); } + cb(void 0, 'OK'); }); };