Skip to content

Commit

Permalink
fix: added more logging to try_crumb_page (#141)
Browse files Browse the repository at this point in the history
This might show why crumb is missing.
  • Loading branch information
iprak authored Nov 2, 2024
1 parent f257858 commit 7da3b84
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions custom_components/yahoofinance/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,14 @@ async def try_crumb_page(self) -> str | None:

if response.status == HTTPStatus.OK:
self.crumb = await response.text()
if not self.crumb:
_LOGGER.error("No crumb reported")

_LOGGER.debug("Crumb page reported %s", self.crumb)
return self.crumb

_LOGGER.error("Crumb request responded with status=%d", response.status)

if response.status == 429:
# Ideally we would want to use the seconds passed back in the header
# for 429 but there seems to be no such value.
Expand Down

0 comments on commit 7da3b84

Please sign in to comment.