Skip to content

feat(sdk): add typed error results#9

Merged
SebastianBoehler merged 1 commit into
mainfrom
codex/typed-sdk-errors
May 11, 2026
Merged

feat(sdk): add typed error results#9
SebastianBoehler merged 1 commit into
mainfrom
codex/typed-sdk-errors

Conversation

@SebastianBoehler
Copy link
Copy Markdown
Owner

Summary

  • add public SdkError, SdkErrorCode, and Result<T> types for opt-in structured failures
  • add result-returning variants for key order creation, posting, cancellation, and order query methods while keeping existing convenience APIs
  • classify transport, auth, rate limit, API response, parse, signing, and invalid argument failures with endpoint/status/body excerpt/retry metadata
  • capture response headers in HttpResponse so request ids can be surfaced when present
  • document the structured error path in the README

Validation

  • cmake -S . -B /tmp/polymarket-cpp-client-verify -DPOLYMARKET_CLIENT_BUILD_EXAMPLES=ON -DPOLYMARKET_CLIENT_BUILD_TESTS=ON
  • cmake --build /tmp/polymarket-cpp-client-verify -- -j4
  • ctest --test-dir /tmp/polymarket-cpp-client-verify --output-on-failure
  • git diff --check

@SebastianBoehler SebastianBoehler force-pushed the codex/typed-sdk-errors branch from b8afa19 to 8505d38 Compare May 11, 2026 14:28
@SebastianBoehler SebastianBoehler merged commit 9259541 into main May 11, 2026
2 checks passed
@SebastianBoehler SebastianBoehler deleted the codex/typed-sdk-errors branch May 11, 2026 14:28
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