From 018c0b9c0c2816739004aef751ac2704152d639e Mon Sep 17 00:00:00 2001 From: myk bilokonsky Date: Mon, 10 Apr 2017 01:53:56 +0200 Subject: handled error for already-boosted toots --- index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/index.js b/index.js index 2e8d8a6..db9d2df 100644 --- a/index.js +++ b/index.js @@ -62,6 +62,10 @@ function boost(rows) { .forEach(function(id) { M.post(`statuses/${id}/reblog`, function(err, result) { if (err) { + if (err.message === 'Validation failed: Reblog of status already exists') { + boosted[id] = true; + } + return console.error(err); } boosted[id] = true; -- cgit