Skip requests that fail validation instead of throwing - #554
marcoscaceres wants to merge 3 commits into
Conversation
mohamedamir
left a comment
There was a problem hiding this comment.
I don't feel strongly in general.
But I feel this diverges from our wpts
We need to eventually audit all our wpts to make sure they are still aligned with the spec after those subtle modification here and there.
|
@copilot resolve the merge conflicts in this pull request |
Co-authored-by: marcoscaceres <870154+marcoscaceres@users.noreply.github.com>
Merge conflicts resolved in 9550db8. The conflict was in the validation-failure step — kept the PR's |
|
@mohamedamir yeah, agree about the testing... but I think this matches reality now, but will confirm again (it's been a little while). We need to update the tests regardless. I think a lot of them currently send empty objects, and all those will start failing soon in WebKit, as WebKit does do early validation/IDL conversion for OpenID. |
Resolves #472.
A request that fails protocol-specific validation is now skipped (like an unsupported protocol) rather than throwing; the call rejects with a TypeError only when no requests survive validation, matching the drop-and-continue behavior implementations use.
The following tasks have been completed:
Modified Web platform tests— not testable yet. Protocol-specific validation is explicitly out of scope for this spec, and simulating a validation failure through virtual wallet automation is tracked in Support testing of response parsing and validation failures in Virtual Wallet automation #498. The sibling skip paths (unsupported and malformed protocols) are already covered by protocol-filtering-openid4vp.https.html and protocol-filtering-mdoc.https.html.Implementation commitment:
Note that WebKit skips a request whose protocol it does not support, but propagates the exception when a supported request's data fails to convert, so it rejects the whole call rather than skipping that request.
Documentation and checks
Preview | Diff