-
Notifications
You must be signed in to change notification settings - Fork 31
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
Receiving http status 429 (Too many requests) only throws exception #331
Comments
New MySkoda API unfortunately doesn't provide any way to check how much request we have remaining |
Unfortunately it does not have a "non-destructive" way to find out - but are you sure, that it does not contain the extra header in the last 15 responses? But even if not, the response status 429 should be caught to output a "known" error message instead of the generic traceback. |
It is entirely possible MySkoda has added this in the last year. A year ago when i did some http debugging, api credit headers were missing. |
I just checked: The API credits are not part of the response when requesting driving range to this date:
|
I added the output of traces to my "daemon" script and will keep an eye of it. |
I made a dirty hack that also logged response.raw_headers in the logging line |
Okay, thanks. If I find it at any time, I'll report back because I have no clue where I could add this check without tracing and how to handle it in general. Add some tag to every event/response? We will discuss this later. |
This error is often returned by the API when too many requests have been sent.
It should be handled, ideally in advance by checking for a header "X-RateLimit-Remaining", which is included in responses whenever there are less than 15 remaining calls allowed, see https://community.home-assistant.io/t/skoda-connect/88288/76
Actual output:
The text was updated successfully, but these errors were encountered: