summary refs log tree commit diff
path: root/index.js
diff options
context:
space:
mode:
authormyk bilokonsky <mbilokonsky@gmail.com>2017-04-10 01:53:56 +0200
committermyk bilokonsky <mbilokonsky@gmail.com>2017-04-10 01:53:56 +0200
commit018c0b9c0c2816739004aef751ac2704152d639e (patch)
tree84d353beb344ebadc34439cece7ff997b1597ff1 /index.js
parentd994755a62313e0c0d929bb1d1e62f7d8c98eeda (diff)
handled error for already-boosted toots
Diffstat (limited to 'index.js')
-rw-r--r--index.js4
1 files changed, 4 insertions, 0 deletions
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;