refactor: update OVP Error message#2512
Conversation
WalkthroughThis PR replaces the localized "unknown verifier" text fallback with a translation-key-based fallback ( ChangesUnknown verifier flow
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related issues
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
locales/tam.json (1)
879-880: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
invalidQRstring is in Kannada, not Tamil.The value
"ದಯವಿಟ್ಟು ಮಾನ್ಯವಾದ QR ಅನ್ನು ಸ್ಕ್ಯಾನ್ ಮಾಡಿ"is Kannada script (identical tolocales/kan.jsonline 892), not translated Tamil text. Tamil users will see the wrong language for this scan-error message.🌐 Proposed fix
- "invalidQR": "ದಯವಿಟ್ಟು ಮಾನ್ಯವಾದ QR ಅನ್ನು ಸ್ಕ್ಯಾನ್ ಮಾಡಿ", + "invalidQR": "தயவுசெய்து சரியான QR ஐ ஸ்கேன் செய்யவும்",🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@locales/tam.json` around lines 879 - 880, The invalidQR translation in locales/tam.json is using Kannada text instead of Tamil, so replace that value with the proper Tamil scan-error message. Update the invalidQR entry in the Tamil locale file to match the language used by scanningGuide and keep the key unchanged so the localization lookup still works.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@screens/openid4vp/SendVPScreenController.ts`:
- Around line 51-61: Drop the unused imports from SendVPScreenController so the
block lint-cleanly compiles; specifically remove getMosipLogo from the VCUtils
import, remove Credential and VerifiableCredentialData from the VCMetaMachine/vc
import, and remove VCMetadata, while keeping the symbols that are still
referenced such as getFaceAttribute, VC, and isDcqlFlow.
In `@shared/hooks/useOvpErrorModal.ts`:
- Around line 2-6: The import list in useOvpErrorModal includes MatchResult, but
that symbol is unused and causes lint failure. Remove MatchResult from the
destructured import from openid4vp.types and keep the remaining referenced types
(such as MatchingVcsResult and VerifierInfo) unchanged.
- Around line 73-81: The `useOvpErrorModal` error handling is shadowing the
later QR-code `invalid_client` branch, so the unknown-verifier modal wins first.
Adjust the `error.includes('invalid_client')` condition in `useOvpErrorModal` to
distinguish the verifier-authentication case from the QR-code fallback (for
example by checking a more specific source or pattern) so the later
invalid-QR-code path can still run. Keep the fix localized to the matching logic
around the existing
`generateAndStoreLogMessage('VERIFIER_AUTHENTICATION_FAILED')` branch.
---
Outside diff comments:
In `@locales/tam.json`:
- Around line 879-880: The invalidQR translation in locales/tam.json is using
Kannada text instead of Tamil, so replace that value with the proper Tamil
scan-error message. Update the invalidQR entry in the Tamil locale file to match
the language used by scanningGuide and keep the key unchanged so the
localization lookup still works.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 743b7422-f4df-42d7-ba21-a81a04a0c1ab
📒 Files selected for processing (16)
components/openid4vp/SendVPError.tsxlocales/ara.jsonlocales/en.jsonlocales/fil.jsonlocales/hin.jsonlocales/kan.jsonlocales/tam.jsonmachines/openID4VP/openID4VPActions.test.tsmachines/openID4VP/openID4VPActions.tsmachines/openID4VP/openID4VPSelectors.test.tsmachines/openID4VP/openID4VPSelectors.tsscreens/Scan/ScanLayout.tsxscreens/openid4vp/SendVPScreen.tsxscreens/openid4vp/SendVPScreenController.tsshared/hooks/useOvpErrorModal.test.tsshared/hooks/useOvpErrorModal.ts
💤 Files with no reviewable changes (1)
- machines/openID4VP/openID4VPActions.test.ts
Changes include 1. Non-2xx response from the verifier after presentation submission - modify error title and message 2. Pre-registered verifier not in the wallet's trusted list - modify error title and message 3. Client name not available in the VP request + No matching credentials -> show unknown verifier Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>
fb68c58 to
df8c1bc
Compare
Changes include
If the client_name is unavailable we can display "Unknown Verifier"
User message: Verification couldn't be completed.
Description: The verifier encountered an error while processing your presentation. Please try again later.
We should avoid exposing HTTP status codes or backend errors in the UI. Those can be logged for debugging.
User message: Untrusted verifier.
Description: This verifier isn't in your wallet's trusted list. Your information has not been shared.
Issue ticket number and link
#2513
Screenshots
OVP Flow - Verifier with no client name
No Matching credentials error screen

Requested cards screen

Verifier Trust Modal

OVP Flow - Verifier responding with non 2xx status code on VP response submission
OVP Flow - Pre-registered verifier not in the wallet's trusted list
Summary by CodeRabbit
New Features
Bug Fixes
Localization