Skip to content

fix: let NoValidTimestampsError propagate from worker for 422 response#325

Closed
Blackgaurd wants to merge 1 commit into04-17-refactor_replace__build_recursive_with_orchestratorfrom
04-17-fix_let_novalidtimestampserror_propagate_from_worker_for_422_response
Closed

fix: let NoValidTimestampsError propagate from worker for 422 response#325
Blackgaurd wants to merge 1 commit into04-17-refactor_replace__build_recursive_with_orchestratorfrom
04-17-fix_let_novalidtimestampserror_propagate_from_worker_for_422_response

Conversation

@Blackgaurd
Copy link
Copy Markdown
Collaborator

@Blackgaurd Blackgaurd commented Apr 18, 2026

Fixes integration test `test_weekend_only_range` returning 500 instead of 422.

What changed

  • `execute_job()` in `service/worker.py` now re-raises `NoValidTimestampsError` instead of catching it into a `JobResult`
  • Updated `test_no_valid_timestamps_raises` to expect the exception to propagate via `pytest.raises`

Why

The orchestrator was wrapping `NoValidTimestampsError` in `RuntimeError`, so `routes.py` never saw the original exception type and returned 500 instead of 422.

🤖 Generated with Claude Code

Copy link
Copy Markdown
Collaborator Author

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