Skip to content

Commit

Permalink
Merge pull request #154 from vincentwolsink/no_more_retries
Browse files Browse the repository at this point in the history
Only retry on unauthorized or http exception. On all other error codes return empty.
  • Loading branch information
vincentwolsink authored Sep 17, 2024
2 parents 3951ccd + 9731e80 commit 4dd5119
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/enphase_envoy/envoy_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,7 @@ async def _async_fetch_with_retry(self, url, **kwargs):
received_401 += 1
continue
_LOGGER.debug("Fetched from %s: %s: %s", url, resp, resp.text)
if resp.status_code == 404:
if resp.status_code != 200:
return None
return resp
except httpx.TransportError as e:
Expand Down

0 comments on commit 4dd5119

Please sign in to comment.