Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throw error for invalid settings #203

Open
vince1995 opened this issue Apr 4, 2022 · 0 comments
Open

Throw error for invalid settings #203

vince1995 opened this issue Apr 4, 2022 · 0 comments

Comments

@vince1995
Copy link

Hey, I was struggeling a lot because I thought there's something wrong in my code. But now I figured out, that I initialized the Bottleneck with "invalid" settings:

new Bottleneck({
    minTime: 50,
    reservoir: 50,
    reservoirRefreshInterval: 5000,
});

The Bottleneck refreshs every 5 seconds the resevoir, but I forgot to set reservoirRefreshAmount (because I thought that reservoir will be used for that). I think it would be good for other developers that if reservoirRefreshAmount is set it throws an error if reservoirRefreshAmount is not set (and vice versa). Same for reservoirIncreaseInterval and reservoirIncreaseAmount.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant