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: except asyncio.TimeoutError:
log.warning("Timed out fetching exchange rate from %s.", self.name) log.warning("Timed out fetching exchange rate from %s.", self.name)
except json.JSONDecodeError as e: 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: except InvalidExchangeRateResponseError as e:
log.warning(str(e)) log.warning(str(e))
except Exception as e: except Exception as e: