node-vk-bot-api
Advanced tools
Comparing version 2.4.5 to 2.4.6
const axios = require('axios'); | ||
const Context = require('../context'); | ||
class PollingError extends Error {} | ||
module.exports = async function (callback, ts) { | ||
@@ -21,2 +23,4 @@ try { | ||
}, | ||
}).catch(() => { | ||
throw new PollingError(); | ||
}); | ||
@@ -46,5 +50,9 @@ | ||
} catch (err) { | ||
this.longPollParams = null; | ||
this.startPolling(); | ||
if (err instanceof PollingError) { | ||
this.longPollParams = null; | ||
this.startPolling(); | ||
} else { | ||
throw err; | ||
} | ||
} | ||
}; |
{ | ||
"name": "node-vk-bot-api", | ||
"version": "2.4.5", | ||
"version": "2.4.6", | ||
"description": "🤖 VK bot framework for Node.js, based on Bots Long Poll API and Callback API", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
33813
846