openviess/PyViCare

Cache for portal error

Closed this issue · 1 comments

When portal service is in error and cache is invalid - all update requests fly directly to portal. Unfortunately these requests are still counted into daily limit. This in turn ends up into daily limit exceeded problem later. Suggestion is to cache the error situation too. It will ensure, that request rate towards portal will not raise above normal.

PyViCare.PyViCareUtils.PyViCareInternalServerError: (PyViCareInternalServerError(...), 'Request failed with status code 502 and message "DEVICE_COMMUNICATION_ERROR". ViCare ErrorId: req-cdded858e04043e885a39c69d4e35845')
...

PyViCareRateLimitError(...), 'API rate limit development portal "bacf20f5-df7f-44dc-bee2-08d0d53c05fd" daily limit exceeded. Max 1450 calls in timewindow. Limit reset at 2022-12-01T00:00:04.508000.'

That issue is already fixed. Please update to the newest version.