UNPKG

@makingchatbots/genesys-cloud-chatbot-tester-cli

Version:

[![npm](https://img.shields.io/npm/v/@makingchatbots/genesys-cloud-chatbot-tester-cli)](https://www.npmjs.com/package/@makingchatbots/genesys-cloud-chatbot-tester-cli) [![Follow me on LinkedIn for updates](https://img.shields.io/badge/Follow%20for%20updat

22 lines (21 loc) 496 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.RetryTask = void 0; exports.tryableTask = tryableTask; class RetryTask extends Error { constructor() { super('Retrying'); Object.setPrototypeOf(this, RetryTask.prototype); } } exports.RetryTask = RetryTask; async function tryableTask(func) { try { await func(false); } catch (e) { if (e instanceof RetryTask) { await func(true); } } }