From 102f14555360b3e2592d2c41b322c760ec9a9b8a Mon Sep 17 00:00:00 2001 From: Thigazhezhilan J Date: Thu, 2 Apr 2026 10:25:01 +0530 Subject: [PATCH] Hide stale errors after strategy stop --- backend/app/services/strategy_service.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/backend/app/services/strategy_service.py b/backend/app/services/strategy_service.py index 8b606bb..dbb4a0b 100644 --- a/backend/app/services/strategy_service.py +++ b/backend/app/services/strategy_service.py @@ -930,7 +930,16 @@ def _issue_is_stale_for_current_state( reason = payload.get("reason") or extra.get("reason") reason_key = str(reason or "").strip().lower() - if status_key == "STOPPED" and event in {"BROKER_AUTH_EXPIRED", "EXECUTION_BLOCKED", "SIP_NO_FILL"}: + if status_key == "STOPPED" and event in { + "BROKER_AUTH_EXPIRED", + "EXECUTION_BLOCKED", + "SIP_NO_FILL", + "PRICE_FETCH_ERROR", + "HISTORY_LOAD_ERROR", + "ENGINE_ERROR", + "ORDER_REJECTED", + "ORDER_CANCELLED", + }: return True if event == "EXECUTION_BLOCKED" and reason_key == "market_closed":