Skip to content

feat(core): add TAPI error classification types and utilities#1156

Open
abueide wants to merge 1 commit intomasterfrom
tapi/types-and-errors
Open

feat(core): add TAPI error classification types and utilities#1156
abueide wants to merge 1 commit intomasterfrom
tapi/types-and-errors

Conversation

@abueide
Copy link
Contributor

@abueide abueide commented Mar 10, 2026

Summary

  • Add foundation types: HttpConfig, BackoffConfig, RateLimitConfig, ErrorClassification, and related config fields to Config and SegmentAPISettings
  • Add error classification utilities: classifyError(), parseRetryAfter(), and improved translateHTTPError()
  • Add comprehensive test suite (33 tests) covering status code classification, retry-after parsing, and SDD-specified overrides

PR 1 of 5 in the TAPI backoff/retry stack. See #1154 for full context.

Test plan

  • npx jest --testPathPattern="errors-classification" — 33 tests pass
  • npx tsc --noEmit — no type errors
  • npx eslint — 0 errors

🤖 Generated with Claude Code

Add foundation types (HttpConfig, BackoffConfig, RateLimitConfig,
ErrorClassification) and error classification utilities (classifyError,
parseRetryAfter, translateHTTPError improvements) for TAPI-compliant
retry handling.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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