From 8e092845bf7f2612b4a9565124471a34eb9939d4 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 17 Jul 2026 20:02:51 +0800 Subject: [PATCH] fix(telegram): add error_detail to logger --- apps/api/src/services/telegram_gateway.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/api/src/services/telegram_gateway.py b/apps/api/src/services/telegram_gateway.py index 7e3cfd6ca..631c340ba 100644 --- a/apps/api/src/services/telegram_gateway.py +++ b/apps/api/src/services/telegram_gateway.py @@ -6639,11 +6639,12 @@ class TelegramGateway: except Exception as exc: logger.warning( "controlled_apply_result_finalize_failed", - automation_run_id=identity["automation_run_id"], - incident_id=identity["incident_id"], - apply_op_id=identity["apply_op_id"], + automation_run_id=identity.get("automation_run_id"), + incident_id=identity.get("incident_id"), + apply_op_id=identity.get("apply_op_id"), attempt=attempt + 1, error_type=type(exc).__name__, + error_detail=str(exc), ) if attempt + 1 < _CONTROLLED_APPLY_OUTBOUND_FINALIZE_ATTEMPTS: await asyncio.sleep(0.05 * (attempt + 1))