How to use @lifeomic/attempt - 2 common examples

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 4 months ago

Package Health Score

81 / 100
Full package analysis

Popular @lifeomic/attempt functions