Skip to content

Skip requests that fail validation instead of throwing - #554

Open
marcoscaceres wants to merge 3 commits into
mainfrom
issue-472-validation-continue
Open

marcoscaceres wants to merge 3 commits into
mainfrom
issue-472-validation-continue

Conversation

@marcoscaceres

@marcoscaceres marcoscaceres commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

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:

Implementation commitment:

  • WebKit (link to issue)
  • Chromium (link to issue)
  • Gecko (link to issue)

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

  • Affects privacy
  • Affects security
  • Pinged MDN
  • Updated Explainer
  • Updated digitalcredentials.dev

Preview | Diff

A request that fails protocol-specific validation is now skipped (like an
unsupported protocol) rather than throwing; the call rejects with a TypeError
only if no requests remain after validation. Resolves the open question in #472.

Closes #472
@marcoscaceres
marcoscaceres requested a review from a team as a code owner July 15, 2026 12:50

@mohamedamir mohamedamir left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@marcoscaceres

Copy link
Copy Markdown
Collaborator Author

@copilot resolve the merge conflicts in this pull request

Co-authored-by: marcoscaceres <870154+marcoscaceres@users.noreply.github.com>

Copilot AI commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

Merge conflicts resolved in 9550db8. The conflict was in the validation-failure step — kept the PR's [=iteration/continue=] behavior and discarded main's throw-with-specific-error block (PR #515), since the whole point of this PR is to skip rather than throw on validation failure.

@marcoscaceres

Copy link
Copy Markdown
Collaborator Author

@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.

This branch has not been deployed

No deployments
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.

User agent request validation and errors

3 participants