Merge pull request #2851 from hroff-1902/improve-logging-3

Add pair to exception messages in exchange module
This commit is contained in:
Matthias 2020-02-03 16:04:55 +01:00 committed by GitHub
commit b8aaf744e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -736,10 +736,11 @@ class Exchange:
f'Exchange {self._api.name} does not support fetching historical candlestick data.'
f'Message: {e}') from e
except (ccxt.NetworkError, ccxt.ExchangeError) as e:
raise TemporaryError(f'Could not load ticker history due to {e.__class__.__name__}. '
f'Message: {e}') from e
raise TemporaryError(f'Could not load ticker history for pair {pair} due to '
f'{e.__class__.__name__}. Message: {e}') from e
except ccxt.BaseError as e:
raise OperationalException(f'Could not fetch ticker data. Msg: {e}') from e
raise OperationalException(f'Could not fetch ticker data for pair {pair}. '
f'Msg: {e}') from e
@retrier_async
async def _async_fetch_trades(self, pair: str,