How to use the @lifeomic/attempt.retry function in @lifeomic/attempt

To help you get started, we’ve selected a few @lifeomic/attempt examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dilame / instagram-private-api / src / core / request.ts View on Github external
private async faultTolerantRequest(options: Options) {
    try {
      return await retry(async () => request(options), this.attemptOptions);
    } catch (err) {
      throw new IgNetworkError(err);
    }
  }
github linkfy / Tools-for-Instagram / node_modules / instagram-private-api / dist / core / request.js View on Github external
async faultTolerantRequest(options) {
        try {
            return await attempt_1.retry(async () => request(options), this.attemptOptions);
        }
        catch (err) {
            throw new errors_1.IgNetworkError(err);
        }
    }
    getDefaultHeaders() {

@lifeomic/attempt

Library that can be used to retry functions that return promise

MIT
Latest version published 8 months ago

Package Health Score

73 / 100
Full package analysis

Popular @lifeomic/attempt functions