diff --git a/hummingbot/connector/exchange/mexc/mexc_exchange.py b/hummingbot/connector/exchange/mexc/mexc_exchange.py index 9cf76ad2a79..60018e286a0 100644 --- a/hummingbot/connector/exchange/mexc/mexc_exchange.py +++ b/hummingbot/connector/exchange/mexc/mexc_exchange.py @@ -875,7 +875,7 @@ async def cancel_all(self, timeout_seconds: float) -> List[CancellationResult]: self.logger().network( f"Failed to cancel all orders: {this_turn_cancel_order_ids}" + repr(ex), exc_info=True, - app_warning_msg=f"Failed to cancel all orders on Mexc. Check API key and network connection." + app_warning_msg="Failed to cancel all orders on Mexc. Check API key and network connection." ) return cancellation_results diff --git a/test/hummingbot/connector/exchange/mexc/test_mexc_exchange.py b/test/hummingbot/connector/exchange/mexc/test_mexc_exchange.py index bb33f39bfb3..3c6f4221bca 100644 --- a/test/hummingbot/connector/exchange/mexc/test_mexc_exchange.py +++ b/test/hummingbot/connector/exchange/mexc/test_mexc_exchange.py @@ -1022,7 +1022,7 @@ def test_execute_cancel_fail(self, mock_cancel, mock_main_app): self.exchange.execute_cancel(self.trading_pair, order.client_order_id) ) - self._is_logged("NETWORK", f"Failed to cancel order 0 : MexcAPIError('Order could not be canceled')") + self._is_logged("NETWORK", "Failed to cancel order 0 : MexcAPIError('Order could not be canceled')") @patch("aiohttp.ClientSession.request", new_callable=AsyncMock) def test_execute_cancel_cancels(self, mock_cancel):