Show potential errors when loading markets

This commit is contained in:
Matthias 2021-03-20 13:33:49 +01:00
parent 16a54b3616
commit 73876b61b4
2 changed files with 3 additions and 3 deletions

View File

@ -311,8 +311,8 @@ class Exchange:
self._markets = self._api.load_markets()
self._load_async_markets()
self._last_markets_refresh = arrow.utcnow().int_timestamp
except ccxt.BaseError as e:
logger.warning('Unable to initialize markets. Reason: %s', e)
except ccxt.BaseError:
logger.exception('Unable to initialize markets.')
def reload_markets(self) -> None:
"""Reload markets both sync and async if refresh interval has passed """

View File

@ -498,7 +498,7 @@ def test__load_markets(default_conf, mocker, caplog):
mocker.patch('freqtrade.exchange.Exchange._load_async_markets')
mocker.patch('freqtrade.exchange.Exchange.validate_stakecurrency')
Exchange(default_conf)
assert log_has('Unable to initialize markets. Reason: SomeError', caplog)
assert log_has('Unable to initialize markets.', caplog)
expected_return = {'ETH/BTC': 'available'}
api_mock = MagicMock()