From 7a0ebb949ddea2fa0dc5da5f570e0de7066578e7 Mon Sep 17 00:00:00 2001 From: bsiggel Date: Tue, 31 Mar 2026 06:57:17 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20replace=20return=20dicts=20with=20raise?= =?UTF-8?q?=20in=20calendar=5Fsync=5Fall=20queue=20handler=20=E2=80=93=20e?= =?UTF-8?q?nables=20Motia=20retry=20on=20failure?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../advoware_cal_sync/calendar_sync_all_step.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/steps/advoware_cal_sync/calendar_sync_all_step.py b/src/steps/advoware_cal_sync/calendar_sync_all_step.py index 64cb302..3999ffc 100644 --- a/src/steps/advoware_cal_sync/calendar_sync_all_step.py +++ b/src/steps/advoware_cal_sync/calendar_sync_all_step.py @@ -49,7 +49,7 @@ async def handler(input_data: Dict[str, Any], ctx: FlowContext) -> None: employees = await get_advoware_employees(advoware, ctx) if not employees: log_operation('error', "Keine Mitarbeiter gefunden. All-Sync abgebrochen.", context=ctx) - return {'status': 500, 'body': {'error': 'Keine Mitarbeiter gefunden'}} + raise RuntimeError("Keine Mitarbeiter gefunden. All-Sync abgebrochen.") redis_client = get_redis_client(ctx) @@ -99,15 +99,7 @@ async def handler(input_data: Dict[str, Any], ctx: FlowContext) -> None: emitted_count += 1 log_operation('info', f"Calendar Sync All: Completed, emitted {emitted_count} events", context=ctx) - return { - 'status': 'completed', - 'triggered_by': triggered_by, - 'emitted_count': emitted_count - } except Exception as e: log_operation('error', f"Fehler beim All-Sync: {e}", context=ctx) - return { - 'status': 'error', - 'error': str(e) - } + raise