Skip to content

Allow web-based payment handlers to report back internal error#429

Open
stephenmcgruer wants to merge 4 commits intogh-pagesfrom
support-operation-error
Open

Allow web-based payment handlers to report back internal error#429
stephenmcgruer wants to merge 4 commits intogh-pagesfrom
support-operation-error

Conversation

@stephenmcgruer
Copy link
Copy Markdown
Collaborator

@stephenmcgruer stephenmcgruer commented Mar 4, 2026

See #428 and w3c/payment-request#1040

closes #???

The following tasks have been completed:

  • web platform tests (link)
  • MDN Docs added (link)

Implementation commitment:

  • Safari (link to issue)
  • Chrome
  • Firefox (link to issue)
  • Edge (public signal)

Preview | Diff

Copy link
Copy Markdown
Member

@romandev romandev left a comment

Choose a reason for hiding this comment

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

looks great

</li>
<li>If <var>handlerResponse</var>.<a data-lt=
"PaymentHandlerResponse.details">details</a> is not present
or not <a>JSON-serializable</a>, run the <a>payment app
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I noticed that the details validation step doesn't pass an OperationError DOMException to the payment app failure algorithm, while the other validation steps (e.g., methodName, shippingAddress, payerName, etc.) all do.

Was this intentional, or just accidentally missed? Let me know if there's a reason for treating it differently — I might be missing some context.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Nope, oversight! Fixed.

@stephenmcgruer stephenmcgruer requested a review from romandev March 20, 2026 01:28
@stephenmcgruer stephenmcgruer marked this pull request as ready for review March 20, 2026 01:28
Copy link
Copy Markdown
Member

@romandev romandev left a comment

Choose a reason for hiding this comment

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

lgtm

@stephenmcgruer
Copy link
Copy Markdown
Collaborator Author

Thanks both for the reviews! I need to update the WPTs still, so this is pending that. Just need to find the time 😢

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.

3 participants