Skip to content

Add FatalError: fail the run loudly (exit 1) on unrecoverable source errors#90

Merged
koenvo merged 3 commits into
mainfrom
feat/fatal-error
Jul 8, 2026
Merged

Add FatalError: fail the run loudly (exit 1) on unrecoverable source errors#90
koenvo merged 3 commits into
mainfrom
feat/fatal-error

Conversation

@koenvo

@koenvo koenvo commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

StopProcessing stops a run gracefully (exit 2). FatalError is its counterpart for unrecoverable, non-retryable problems (e.g. a deactivated account): the source/loader raises it, ingestify propagates it out of find_datasets/collect instead of swallowing it as a skipped find_datasets, and the CLI exits non-zero so schedulers surface the failure.

koenvo added 3 commits July 8, 2026 11:29
…errors

StopProcessing stops a run gracefully (exit 2). FatalError is its
counterpart for unrecoverable, non-retryable problems (e.g. a deactivated
account): the source/loader raises it, ingestify propagates it out of
find_datasets/collect instead of swallowing it as a skipped find_datasets,
and the CLI exits non-zero so schedulers surface the failure.

Claude-Session: https://claude.ai/code/session_01B5EfLJqoafjW1FhvkxGSmg
…sing controlled

Two fixes on top of the FatalError work:

1. FatalError now persists the summary (as FAILED) before aborting. The loader
   has no finally to save an in-progress summary, so a bare re-raise lost the
   record entirely. It now set_exception + yields (so the loader stores it) +
   re-raises, at each point FatalError can surface.

2. The async submit/collect path had NO stop/fail handling at all: a
   StopProcessing (e.g. quota) or FatalError raised while collecting propagated
   without ever persisting the summary. Added a handler mirroring the sync path
   so StopProcessing saves a FINISHED summary (controlled stop) and FatalError a
   FAILED one.

StopProcessing keeps its own controlled-stop semantics and is no longer folded
into FatalError's re-raise clauses — only FatalError forces the hard stop.

Claude-Session: https://claude.ai/code/session_01B5EfLJqoafjW1FhvkxGSmg
@koenvo koenvo merged commit 322fa7b into main Jul 8, 2026
13 checks passed
@koenvo koenvo deleted the feat/fatal-error branch July 8, 2026 11:00
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