Skip to content

Commit 7abaa97

Browse files
committed
[Errors] handle missing html error
1 parent 90008e3 commit 7abaa97

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

octobot_trading/exchanges/traders/trader.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import typing
2020

2121
import octobot_commons.logging as logging
22+
import octobot_commons.html_util as html_util
2223
import octobot_commons.constants
2324

2425
import octobot_trading.personal_data.orders.order_factory as order_factory
@@ -452,7 +453,8 @@ async def _handle_order_cancel_error(self, order, err, wait_for_cancelling, canc
452453
elif order.is_open():
453454
if isinstance(err, errors.OrderNotFoundOnCancelError):
454455
raise errors.OrderNotFoundOnCancelError(
455-
f"Tried to cancel an order that can't be found, it might be cancelled or filled already ({err}). "
456+
f"Tried to cancel an order that can't be found, it might be cancelled or filled already "
457+
f"({html_util.get_html_summary_if_relevant(err)}). "
456458
f"Order: {order}"
457459
) from err
458460
raise errors.OpenOrderError(

0 commit comments

Comments
 (0)