-
Notifications
You must be signed in to change notification settings - Fork 32
Add further details of how errors are returned from Browser API including a example error response #204
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
Comments
it would be good to discuss here and in the DC spec itself how we handle particular types of errors and response errors... we need to clarify what's "exceptional" (causing the promise to reject in the browser API), and what's expected as response data when there is some error. |
I agree @marcoscaceres - it would probably be good to have a discussion about errors in a WICG call. I had a look and this issue from Rick is probably a place to discuss it: w3c-fedid/digital-credentials#130 We may also need to update the example javascript call to the digital credential API in the VP spec depending on the outcome. |
discussed during the WG call:
|
I think wallet implementations are currently behaving inconsistently here, so I do think we need to clarify this. It is definitely expected that an error before the user has actually selected a credential to return will result in an exception that has no detail (to avoid leaking any information without user interaction). Once the user has selected a credential there's definitely an argument that a more detailed error can be returned. At least in the current Android implementation my understanding is that the only way to return a more detailed error to the verifier/caller is to return it in the same way you would return a successful response, i.e. the DC API would return a Credential object where |
This is causing some issues for the certification team as we have tests that deliberately generate errors and need to know how to process an error response. Moved to 1.0 & added 'discuss' in the hope we might be able to quickly reach a consensus on this. |
My suggestion would be we add text saying that errors coming from the wallet (and hence after the user has indicated some willingness to share with the verifier) are returned as an OID4VP response and not as a promise rejection. My main reluctance against promise rejection is that (at least in the google implementation I tried) it seems any information the wallet returns seems to be replaced with simply "Network error" so the developer doesn't get access to the actual error from the wallet. (Would be good to know if this is by design / specced by W3C like that / ...). I could be persuaded to go in that direction if the verifier does actually get error info that occurs post-credential selection & that wallet is willing to share |
This seems quite reasonable on the face of it. |
WG discussion:
|
direction seems to be
cc @timcappalli @marcoscaceres @leecam and notes
|
@timcappalli if you could do the PR, @GarethCOliver could help with the privacy considerations |
As per @awoie comment here https://github.com/openid/OpenID4VP/pull/155/files#r1652002661:
and @marcoscaceres comment here https://github.com/openid/OpenID4VP/pull/155/files#r1660602655:
The text was updated successfully, but these errors were encountered: