@grammyjs/auto-retry
Advanced tools
Comparing version 2.0.1 to 2.0.2
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.autoRetry = void 0; | ||
exports.autoRetry = autoRetry; | ||
const platform_node_js_1 = require("./platform.node.js"); | ||
@@ -56,3 +56,4 @@ const debug = (0, platform_node_js_1.debug)("grammy:auto-retry"); | ||
catch (e) { | ||
if (!rethrowHttpErrors && e instanceof platform_node_js_1.HttpError) { | ||
if ((signal === undefined || !signal.aborted) && | ||
!rethrowHttpErrors && e instanceof platform_node_js_1.HttpError) { | ||
debug(`HttpError thrown, will retry '${method}' after ${nextDelay} seconds (${e.message})`); | ||
@@ -92,2 +93,1 @@ await backoff(); | ||
} | ||
exports.autoRetry = autoRetry; |
{ | ||
"name": "@grammyjs/auto-retry", | ||
"description": "grammY API transformer function to retry requests", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"author": "KnorpelSenf", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
11079