Skip to content

fix(client): map unknown builder fee code to user input error#97

Merged
cesarenaldi merged 3 commits into
mainfrom
fix/dev-166-builder-fee-404
Jun 5, 2026
Merged

fix(client): map unknown builder fee code to user input error#97
cesarenaldi merged 3 commits into
mainfrom
fix/dev-166-builder-fee-404

Conversation

@cesarenaldi
Copy link
Copy Markdown
Collaborator

@cesarenaldi cesarenaldi commented Jun 5, 2026

Summary

  • map 404 builder-fee responses to UserInputError for invalid/stale builder codes
  • keep other builder-fee HTTP failures as RequestRejectedError
  • cover the actual market-order path with a single integration test in packages/client/tests/integration/orders.test.ts
  • add a patch changeset for @polymarket/client

This does not introduce a new one-off error type and does not silently drop builder attribution. Live endpoint behavior currently returns a structured 404 with CORS headers, so this is a narrow SDK input-error mapping for an invalid builder code.

Fixes #74
Linear: DEV-166

Verification

  • pnpm test:client:integration packages/client/tests/integration/orders.test.ts
  • pnpm lint
  • pnpm typecheck

@cesarenaldi cesarenaldi changed the title Fix unknown builder fee code errors Map unknown builder fee code to user input error Jun 5, 2026
@cesarenaldi cesarenaldi changed the title Map unknown builder fee code to user input error fix(client): map unknown builder fee code to user input error Jun 5, 2026
@cesarenaldi cesarenaldi merged commit b03e211 into main Jun 5, 2026
8 checks passed
@cesarenaldi cesarenaldi deleted the fix/dev-166-builder-fee-404 branch June 5, 2026 18:53
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.

client: fetchBuilderFeeRates lacks 404 handling — prepareMarketOrder with unregistered builderCode crashes instead of degrading

1 participant