-
Notifications
You must be signed in to change notification settings - Fork 21
Surface DID resolution errors in VP verification failures #3979
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
Coverage Impact ⬆️ Merging this pull request will increase total coverage on Modified Files with Diff Coverage (4)
🤖 Increase coverage with AI coding...🚦 See full report on Qlty Cloud » 🛟 Help
|
1 new issue
|
8aa2b43 to
3e58304
Compare

Plan: Improve Client Error Message for DID Resolution Failures
Summary of Changes
Problem: Currently, when the server can't resolve a DID document during VP verification, it returns a generic error: "presentation(s) or contained credential(s) are invalid". This makes troubleshooting difficult for clients.
Solution Implemented:
Created
verificationErrorDescription()helper (auth/api/iam/openid4vp.go):errors.Is()and string pattern matchingUpdated error handling in two locations:
auth/api/iam/openid4vp.go- OpenID4VP HandleAuthorizeResponse flowauth/api/iam/s2s_vptoken.go- Service-to-service VP token verification flowAdded comprehensive tests (
auth/api/iam/openid4vp_test.go):New Error Messages:
Review Feedback Addressed:
err.Error()directly instead of custom messagesTesting Results:
Security Considerations:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.