Skip to content

Max Retries

Ollie Jennings edited this page Sep 11, 2020 · 2 revisions

Motivation

Whilst you would generally want the rate-limiter to retry requests that return a 429 status, it makes sense that you would want to limit the number of retires, just incase the rate-limiter only every receives 429s (potentially due to some infrastructure issue on Riots end).

This option can be set in the constructor of the rate-limiter, and defaults to 4, as we do not want to get your API Token blacklisted, or prevent you from recovering from an infinite loop of 429 responses.

Usage

const limiter = new RiotRateLimiter({ retryLimit: 4 });
Clone this wiki locally