Skip to content

feat(catalog-etl): wrap shouldSkip() in outer try/catch to prevent unhandled cron errors#291

Open
GitAddRemote wants to merge 1 commit into
feature/ISSUE-221from
feature/ISSUE-227
Open

feat(catalog-etl): wrap shouldSkip() in outer try/catch to prevent unhandled cron errors#291
GitAddRemote wants to merge 1 commit into
feature/ISSUE-221from
feature/ISSUE-227

Conversation

@GitAddRemote
Copy link
Copy Markdown
Owner

Summary

  • The scheduledTerminalEtl() body is now wrapped in an outer try/catch so any getLastSuccessfulStepRun() DB error thrown by shouldSkip() is caught and logged at ERROR level rather than escaping the cron handler as an unhandled rejection
  • Inner try/catch blocks for runStep() calls are unchanged — their error-handling paths are unaffected
  • Transient DB errors during the skip guard log 'terminal ETL skip guard failed' and return cleanly without crashing the scheduler

Note: This PR targets feature/ISSUE-221 (not main) since it builds on the consolidated scheduler introduced there.

Test plan

  • New test: getLastSuccessfulStepRun rejects → method resolves without throwing, logger.error called with 'terminal ETL skip guard failed', runStep not called
  • All 7 scheduler unit tests pass
  • ESLint and Prettier clean

Closes #227

…ent unhandled cron errors

- Enclose the full scheduledTerminalEtl() body in an outer try/catch so any DB error thrown by getLastSuccessfulStepRun() is caught, logged at ERROR, and returned rather than propagating as an unhandled scheduler exception
- Inner try/catch blocks for runStep() calls remain unchanged — their error handling is unaffected
- Add test: guard-throws path resolves without throwing and logs 'terminal ETL skip guard failed'

Closes #227
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant