fix: add error handling for CashboxExportScheduler subscription processing

- Wrap runOne(subscription) in try/catch to ensure one subscription failure doesn't block remaining subscriptions
- Log failed subscriptions with new 'cashbox_export_subscription_run_fail' event
- Add new LOGEVENT type for subscription run failures
- Add test to verify second subscription processes even when first fails (continues processing independently)
- All 7 tests passing: 6 original + 1 new failure handling test

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Bastian Wagner
2026-08-04 07:56:39 +02:00
parent 5779483b21
commit eed8266da2
3 changed files with 38 additions and 3 deletions

View File

@@ -31,6 +31,7 @@ export type LOGEVENT =
| 'recurring_transaction_update'
| 'recurring_transaction_delete'
| 'recurring_transaction_run'
| 'cashbox_export_subscription_run';
| 'cashbox_export_subscription_run'
| 'cashbox_export_subscription_run_fail';
export type LOGLEVEL = 'FATAL' | 'ERROR' | 'WARN' | 'INFO' | 'DEBUG' | 'TRACE';