throttled-queue icon indicating copy to clipboard operation
throttled-queue copied to clipboard

Bug

Open SuchismitaGoswami opened this issue 3 years ago • 0 comments

Describe the bug The library does not through an error if provided with a string in place of number, as expected for maxRequestsPerInterval field

To Reproduce Steps to reproduce the behavior: Please use the below code to reproduce the behavior

 static throttle = throttledQueue("100 // at most 100 requests per second", 1000); 
 let {data} = await throttle(() => {
                    return axios({
                    method: 'get',
                    url: <URL>,
                });
   });

Expected behavior It should raise an error that input is invalid

Additional context I am fine to raise a PR to fix this issue if allowed

SuchismitaGoswami avatar Mar 29 '23 12:03 SuchismitaGoswami