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

fix: Rate limit error when executing requests too quickly #10

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rswilem
Copy link

@rswilem rswilem commented Aug 11, 2021

I have created this very simple fix for the following error:

django.core.exceptions.ImproperlyConfigured:

{"success": false, "error": {"code": 106, "type": "rate_limit_reached", "info": "You have exceeded the maximum rate limitation allowed on your subscription plan. Please refer to the \"Rate Limits\" section of the API Documentation for details. "}}

It seems the Vatlayer API prevents two fast consecutive requests. Therefore I've added a small delay between the requests.

For reference, the error that pops up in Saleor:
Screenshot 2021-08-11 at 17 05 13

@rswilem rswilem changed the title feat: Fix for rate limit error when executing requests too quickly fix: Rate limit error when executing requests too quickly Aug 11, 2021
Copy link

@nvrebcevic nvrebcevic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I welcome this change very well. It should be merged as soon as possible since manage.py get_vat_rates is practically useless without this sleep, at least for the free subscription Vatlayer account.

django_prices_vatlayer/utils.py Outdated Show resolved Hide resolved
@yevheniidehtiar
Copy link

guys, still actual

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

Successfully merging this pull request may close these issues.

None yet

3 participants