Skip to content

Surface KYC rejection reasons for NEEDS_INFORMATION state#2059

Merged
MusabShakeel576 merged 1 commit intoqafrom
claude/fallback-error-message-BJ6Bf
May 10, 2026
Merged

Surface KYC rejection reasons for NEEDS_INFORMATION state#2059
MusabShakeel576 merged 1 commit intoqafrom
claude/fallback-error-message-BJ6Bf

Conversation

@MusabShakeel576
Copy link
Copy Markdown
Contributor

Summary

Updated the KYC description logic to surface specific rejection reasons when the application is in the NEEDS_INFORMATION state, while keeping other states generic for privacy reasons.

Key Changes

  • Modified getKYCDescription() to accept an optional kycWarnings parameter
  • Added logic to format and display KYC warnings for NEEDS_INFORMATION state only
  • Updated getStepDescription() to pass kycWarnings to getKYCDescription()
  • Reordered variable declarations in getStepDescription() for better code organization

Implementation Details

  • For NEEDS_INFORMATION state: If warnings are present, they're formatted and displayed with a bulleted list format. If no warnings exist, a generic message is shown.
  • For final rejection states (DENIED, LOCKED, CANCELED): Messages remain generic and do not expose underlying compliance labels (e.g., SANCTIONS, PEP) for privacy/security reasons
  • Updated JSDoc comment to clarify the different handling between states

https://claude.ai/code/session_01L5L47KxTVnU3xJSWxN4Qfr

getStepDescription early-returned the generic Rain status text and never
consulted kycWarnings, so the rejection labels we now surface from the
backend (via the user.updated webhook applicationReason field) were
silently dropped on the first step of /card/activate. Pass warnings into
getKYCDescription and bullet them under the NEEDS_INFORMATION message —
the only Rain state Rain documents as carrying temporary, user-actionable
labels. Final rejections (denied/locked/canceled) stay generic so we
don't leak compliance labels like SANCTIONS or PEP to the user.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated (UTC)
solid-app Ignored Ignored May 10, 2026 9:47am
solid-app-staging Ignored Ignored May 10, 2026 9:47am

Request Review

@MusabShakeel576 MusabShakeel576 merged commit efba7e9 into qa May 10, 2026
4 of 5 checks passed
@MusabShakeel576 MusabShakeel576 deleted the claude/fallback-error-message-BJ6Bf branch May 10, 2026 09:49
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