Skip to content

feat(bridge): add KYC tier ceiling error code (ENG-354)#394

Open
patoo0x wants to merge 1 commit into
tmp/bridge-rebase-pr-readyfrom
eng-354/kyc-tier-ceiling-error
Open

feat(bridge): add KYC tier ceiling error code (ENG-354)#394
patoo0x wants to merge 1 commit into
tmp/bridge-rebase-pr-readyfrom
eng-354/kyc-tier-ceiling-error

Conversation

@patoo0x
Copy link
Copy Markdown
Contributor

@patoo0x patoo0x commented Jun 6, 2026

Summary

Adds a distinct BRIDGE_KYC_TIER_CEILING_EXCEEDED GraphQL error code for when Bridge rejects a withdrawal because the amount exceeds the user's KYC-tier cap.

Changes

  • src/services/bridge/errors.ts: Added BridgeKycTierCeilingExceededError class + detection in mapBridgeHttpError for Bridge API 422/400 responses containing KYC tier ceiling errors
  • src/graphql/error-map.ts: Mapped BridgeKycTierCeilingExceededErrorBRIDGE_KYC_TIER_CEILING_EXCEEDED
  • **docs/bridge-integration/API.md: Added error code to the table
  • **test/flash/unit/graphql/bridge-error-map.spec.ts: Added GQL mapping test for the new error + 5 mapBridgeHttpError detection tests

Verification

  • 37 bridge error-map tests pass
  • 3 bridge contract tests pass
  • Prettier clean
  • yarn check:sdl clean
  • No schema regeneration needed (error mapping only)

@linear
Copy link
Copy Markdown

linear Bot commented Jun 6, 2026

ENG-354

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