Skip to content

Comments

throw on error#308

Merged
sami-polymarket merged 5 commits intomainfrom
sami/throw-on-error
Feb 19, 2026
Merged

throw on error#308
sami-polymarket merged 5 commits intomainfrom
sami/throw-on-error

Conversation

@sami-polymarket
Copy link
Contributor

@sami-polymarket sami-polymarket commented Feb 19, 2026

Note

Medium Risk
Changes core request/response behavior by optionally throwing exceptions, which can alter consumer control flow if enabled; default behavior remains unchanged.

Overview
Adds an opt-in throwOnError flag to ClobClient that converts API error-shaped responses (objects with an error field) into thrown ApiErrors across get/post/put/del, while preserving the current behavior by default.

Introduces and exports the new ApiError type, documents the new error-handling mode in README.md, adds tests covering thrown vs returned errors, and bumps the package version to 5.2.4.

Written by Cursor Bugbot for commit 2990daa. This will update automatically on new commits. Configure here.

@sami-polymarket sami-polymarket requested a review from a team as a code owner February 19, 2026 21:17
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

@sami-polymarket sami-polymarket merged commit 815387d into main Feb 19, 2026
5 checks passed
@sami-polymarket sami-polymarket deleted the sami/throw-on-error branch February 19, 2026 22:58
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