Skip to content

Commit

Permalink
raise ForecastSolarConnectionError when service is down for maintenance
Browse files Browse the repository at this point in the history
  • Loading branch information
bj00rn committed Mar 20, 2024
1 parent 171deff commit d8e2e58
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion forecast_solar/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ async def _request(
ssl=False,
)

if response.status == 502:
if response.status in (502, 503):
raise ForecastSolarConnectionError(
"The Forecast.Solar API is unreachable, "
)
Expand Down

0 comments on commit d8e2e58

Please sign in to comment.