Skip to content

v0.3.0

Choose a tag to compare

@EetuPelkonen EetuPelkonen released this 05 Nov 11:53
· 5 commits to main since this release

Adds ForecaProductUnavailableError, raised when the API answers 403 {"error": "product_unavailable"}: the key is valid, but its plan does not include the product, for example air quality.

That response used to raise ForecaAuthError, so a client took a good key for a rejected one. A 401, and a 403 with any other body, still raise ForecaAuthError. The new error subclasses ForecaError, not ForecaAuthError; code that caught ForecaAuthError for this case should catch ForecaProductUnavailableError.