Skip to content

feat: move shouldSkip() inside try/catch in CatalogEtlScheduler to prevent unhandled cron errors #227

@GitAddRemote

Description

@GitAddRemote

User Story

As a system operator, I want scheduler errors from the ETL skip guard to be caught and logged rather than crashing the cron handler, so that transient database issues don't silently kill scheduled sync jobs.

Definition of Done

  • shouldSkip() (or getLastSuccessfulStepRun()) call is inside the try/catch block in each scheduled method in CatalogEtlScheduler
  • A DB error during the guard logs an error (via the existing logger) and does not propagate as an unhandled scheduler exception
  • Existing scheduler unit tests updated to cover the guard-throws path
  • All tests pass

Acceptance Criteria

  • Given a DB connection error occurs inside getLastSuccessfulStepRun(), the cron handler catches it, logs it, and returns without crashing
  • Given the guard succeeds normally, step execution continues as before

Technical Elaboration

Currently in CatalogEtlScheduler, shouldSkip() is awaited before the try/catch, so any getLastSuccessfulStepRun() DB error escapes the cron handler unhandled. Moving the await inside the try/catch (or wrapping the entire method body) is sufficient to fix this.

Identified in PR #220 review (thread PRRT_kwDOMAoKhM6E5X2n).

Design Elaboration

No UI changes required.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions