Skip to content

Add error hierarchy for Trigger.dev API responses - #7

Merged
mehmetkr merged 1 commit into
mainfrom
item-7-error-hierarchy
Nov 26, 2026
Merged

mehmetkr merged 1 commit into
mainfrom
item-7-error-hierarchy

Conversation

@mehmetkr

Copy link
Copy Markdown
Owner

Summary

  • 16 exception classes in src/triggerdev/_exceptions.py following anthropic-sdk-python and openai-python patterns
  • Covers all HTTP error codes in the Trigger.dev API spec: 400, 401, 403, 404, 409, 413, 422, 429, 500, 501, 503
  • RateLimitError.retry_after convenience property parses Retry-After header as delta-seconds
  • APIConnectionError and APITimeoutError for network-level failures
  • Re-exported from triggerdev package for public API access
  • 34 tests covering hierarchy, attributes, retry-after parsing, catch patterns, and public re-exports

Test plan

  • pyright strict: 0 errors
  • mypy strict: 0 issues
  • ruff: all checks passed
  • pytest: 34/34 tests pass
  • Design adversarial audit: PASS (round 2, all spec codes verified)
  • Implementation adversarial audit: PASS (round 2, all 7 dimensions clean)

@mehmetkr
mehmetkr merged commit 30bc30e into main Nov 26, 2026
7 checks passed
@mehmetkr
mehmetkr deleted the item-7-error-hierarchy branch November 26, 2026 19:57
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