Add "catch-all" exceptionhandler for handle_onexchange_order

(it's actually a poor mans workaround)
closes #9025
This commit is contained in:
Matthias 2023-09-10 20:27:08 +02:00
parent 421a6c02a0
commit 29fbac9f96

View File

@ -468,8 +468,6 @@ class FreqtradeBot(LoggingMixin):
safe_value_fallback(order, 'lastTradeTimestamp', 'timestamp') // 1000,
tz=timezone.utc)
trade.orders.append(order_obj)
# TODO: how do we handle open_order_id ...
Trade.commit()
prev_exit_reason = trade.exit_reason
trade.exit_reason = ExitType.SOLD_ON_EXCHANGE.value
self.update_trade_state(trade, order['id'], order)
@ -485,7 +483,10 @@ class FreqtradeBot(LoggingMixin):
Trade.commit()
except ExchangeError:
logger.warning("Error finding onexchange order")
logger.warning("Error finding onexchange order.")
except Exception:
# catching https://github.com/freqtrade/freqtrade/issues/9025
logger.warning("Error finding onexchange order", exc_info=True)
#
# BUY / enter positions / open trades logic and methods
#