The class ForecastSolarRatelimitError takes the data reposnse and extracts the object rateLimit from which it extracts the retry-at attribute:
super().__init__(data)
self.reset_at = datetime.fromisoformat(data["ratelimit"]["retry-at"])]
Well, the retry-at attribute is completely missing from the response hence during the raise of the ForecastSolarRatelimitError, another error KeyError is raised.
Here's an example of the data structure:
{'code': 429, 'info': [], 'pid': 'bT2839f9', 'ratelimit': {'limit': 12, 'period': 3600, 'zone': 'IP 161.31.124.95'}, 'text': 'Rate limit for API calls reached.', 'type': 'error'}
The class ForecastSolarRatelimitError takes the data reposnse and extracts the object rateLimit from which it extracts the retry-at attribute:
Well, the retry-at attribute is completely missing from the response hence during the raise of the ForecastSolarRatelimitError, another error KeyError is raised.
Here's an example of the data structure:
{'code': 429, 'info': [], 'pid': 'bT2839f9', 'ratelimit': {'limit': 12, 'period': 3600, 'zone': 'IP 161.31.124.95'}, 'text': 'Rate limit for API calls reached.', 'type': 'error'}