dont log full pages

This commit is contained in:
Victor Shyba 2021-05-04 01:16:29 -03:00 committed by Victor Shyba
parent a6b7469923
commit 45e5b3b219

View file

@ -86,7 +86,9 @@ class MarketFeed:
except asyncio.TimeoutError:
log.warning("Timed out fetching exchange rate from %s.", self.name)
except json.JSONDecodeError as e:
log.warning("Could not parse exchange rate response from %s: %s", self.name, e.doc)
msg = e.doc if '<html>' not in e.doc else 'unexpected content type.'
log.warning("Could not parse exchange rate response from %s: %s", self.name, msg)
log.debug(msg)
except InvalidExchangeRateResponseError as e:
log.warning(str(e))
except Exception as e: