Improve logging for #9460

This commit is contained in:
Matthias 2023-11-23 07:22:44 +01:00
parent a044649eef
commit e9f21d0209

View File

@ -1228,16 +1228,16 @@ class Exchange:
return order return order
except ccxt.InsufficientFunds as e: except ccxt.InsufficientFunds as e:
raise InsufficientFundsError( raise InsufficientFundsError(
f'Insufficient funds to create {ordertype} sell order on market {pair}. ' f'Insufficient funds to create {ordertype} {side} order on market {pair}. '
f'Tried to sell amount {amount} at rate {limit_rate}. ' f'Tried to {side} amount {amount} at rate {limit_rate} with '
f'Message: {e}') from e f'stop-price {stop_price_norm}. Message: {e}') from e
except (ccxt.InvalidOrder, ccxt.BadRequest) as e: except (ccxt.InvalidOrder, ccxt.BadRequest) as e:
# Errors: # Errors:
# `Order would trigger immediately.` # `Order would trigger immediately.`
raise InvalidOrderException( raise InvalidOrderException(
f'Could not create {ordertype} sell order on market {pair}. ' f'Could not create {ordertype} {side} order on market {pair}. '
f'Tried to sell amount {amount} at rate {limit_rate}. ' f'Tried to {side} amount {amount} at rate {limit_rate} with '
f'Message: {e}') from e f'stop-price {stop_price_norm}. Message: {e}') from e
except ccxt.DDoSProtection as e: except ccxt.DDoSProtection as e:
raise DDosProtection(e) from e raise DDosProtection(e) from e
except (ccxt.NetworkError, ccxt.ExchangeError) as e: except (ccxt.NetworkError, ccxt.ExchangeError) as e: