Skip to content

Conversation

@aezell
Copy link
Contributor

@aezell aezell commented Jan 27, 2026

Summary

  • Add APIError class with all structured fields including upgradeUrl
  • Add parseAPIError() function for parsing HTTP error responses
  • Update client.ts to use parseAPIError for all HTTP error handling
  • Add comprehensive tests for APIError and parseAPIError
  • Export APIError and related utilities from index.ts

This matches the error handling improvements in the Go SDK, allowing callers to access structured error information (error code, limits, upgrade URL) directly from rate limit and other API errors.

- Add APIError class with all structured fields including upgradeUrl
- Add parseAPIError() function for parsing HTTP error responses
- Update client.ts to use parseAPIError for all HTTP error handling
- Add comprehensive tests for APIError and parseAPIError
- Export APIError and related utilities from index.ts

This matches the error handling improvements in the Go SDK, allowing
callers to access structured error information (error code, limits,
upgrade URL) directly from rate limit and other API errors.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@aezell aezell merged commit 16b1392 into main Jan 28, 2026
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.

2 participants