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