Skip to content

fix(errors): use rate_limit for HTTP 429 - #498

Merged
usmanimamu17-create merged 1 commit into
ApexChainx:mainfrom
hussainemiola942-cloud:fix/api-error-kinds-381
Sep 1, 2026
Merged

fix(errors): use rate_limit for HTTP 429#498
usmanimamu17-create merged 1 commit into
ApexChainx:mainfrom
hussainemiola942-cloud:fix/api-error-kinds-381

Conversation

@hussainemiola942-cloud

@hussainemiola942-cloud hussainemiola942-cloud commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Overview

Updates API error normalization so HTTP 429 responses use the issue-specified rate_limit kind instead of rate_limited.

Related Issue

Closes #381

Changes

  • Renamed the ApiErrorKind value for HTTP 429 from rate_limited to rate_limit.
  • Updated normalizeApiError to return rate_limit for 429 responses.
  • Updated the existing error normalization test expectation for 429 responses.

Verification Results

Command Result
npm.cmd test -- --run tests/errors.test.ts Passed: 11 tests
npm.cmd test Failed due to unrelated existing failures: 37 files passed, 10 files failed; 216 tests passed, 18 failed
npm.cmd run typecheck Failed due to unrelated existing syntax errors in src/lib/session-sse.ts, tests/export-filename.test.ts, and tests/redirect.test.ts
npm.cmd run lint Failed before project linting because @typescript-eslint/no-unsafe-assignment requires typed parser options in eslint.config.mjs
git diff --check Passed

Acceptance Criteria

Criteria Status
409 responses normalize to a conflict kind Existing behavior confirmed
429 responses normalize to the issue-specified rate limit kind Done
Tests cover the 429 kind contract Done

@drips-wave

drips-wave Bot commented Aug 31, 2026

Copy link
Copy Markdown

@hussainemiola942-cloud Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@usmanimamu17-create
usmanimamu17-create merged commit 98f468d into ApexChainx:main Sep 1, 2026
usmanimamu17-create pushed a commit that referenced this pull request Sep 2, 2026
Co-authored-by: hussainemiola942-cloud <305965128+hussainemiola942-cloud@users.noreply.github.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.

ApiErrorKind does not include conflict or rate-limit: 409 and 429 responses normalize to "unknown" with no actionable kind

2 participants