Skip to content

Comments

feat(express): improve typed routes validation error messages#8178

Merged
Marzooqa merged 1 commit intomasterfrom
WP-7883
Feb 24, 2026
Merged

feat(express): improve typed routes validation error messages#8178
Marzooqa merged 1 commit intomasterfrom
WP-7883

Conversation

@Marzooqa
Copy link
Contributor

@Marzooqa Marzooqa commented Feb 19, 2026

Summary

  • Replace raw io-ts validation errors with human-readable messages in typed routes
  • Add ValidationError class for consistent error handling

Before

[
    "Invalid value undefined supplied to : httpRequest/body: Exact<({ address: string, amount: (number | string) } & Partial<{ data: (string | undefined), feeLimit: (string | undefined), walletPassphrase: (string | undefined),...............Partial<{ address: string }>)> }> } & Partial<{ verification: any }>) | undefined) }>/memo: ({ value: string, type: string } | undefined)/1: undefined"
]    

After:

{
    "error": "Missing required field 'memo.value'. Missing required field 'memo.type'.",
    "message": "Missing required field 'memo.value'. Missing required field 'memo.type'.",
    "name": "ValidationError",
    "bitgoJsVersion": "...",
    "bitgoExpressVersion": "....."
}                                                                                         
   

TICKET: WP-7883

@Marzooqa Marzooqa marked this pull request as ready for review February 19, 2026 12:30
@Marzooqa Marzooqa requested review from a team as code owners February 19, 2026 12:30
pranavjain97
pranavjain97 previously approved these changes Feb 20, 2026
Copy link
Contributor

@pranavjain97 pranavjain97 left a comment

Choose a reason for hiding this comment

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

nice work

Copy link
Contributor

@lokesh-bitgo lokesh-bitgo left a comment

Choose a reason for hiding this comment

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

Looks good

@Marzooqa Marzooqa merged commit bea86f8 into master Feb 24, 2026
24 checks passed
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.

3 participants