Skip to content

fix(browser): surface a failed Apple Pay credentials exchange on the error event - #1013

Closed
Alexander (alexander-rw) wants to merge 1 commit into
masterfrom
alexander-rw/card-1247-apple-pay-web-a-failed-credentials-exchange-throws-an
Closed

fix(browser): surface a failed Apple Pay credentials exchange on the error event#1013
Alexander (alexander-rw) wants to merge 1 commit into
masterfrom
alexander-rw/card-1247-apple-pay-web-a-failed-credentials-exchange-throws-an

Conversation

@alexander-rw

Copy link
Copy Markdown
Contributor

Closes CARD-1247. A failed Apple Pay credentials exchange currently dies as an uncaught TypeError with no error event and no sheet dismissal, which is why the Upgrow outage ran silent for five days — this puts the failure on the SDK's error channel where a merchant can actually see it.

#1012 stacks on this. Replaces #1010, which GitHub auto-marked merged when a restack briefly made its head an ancestor of its base.

CARD-1247. #exchangeApplePaymentData returned res.json() without checking
res.ok, so a 500 from /frontend/apple-pay/credentials was handed back as if
it were a successful exchange. It passed the tryCatch that guards the call
and the handler then died on encrypted.card.displayName — thrown outside the
caught region, so no error event fired and response.complete() was never
called, leaving the sheet spinning until Apple timed it out.

Check the status and the body shape, and complete the sheet as failed on the
error path so a credentials failure reaches the merchant's error handler. The
message is built from the documented API Error schema (detail, falling back
to title) plus the HTTP status.

Found while investigating the Upgrow outage, where this masked a five-day
server-side failure across ~30 real customer authorizations.
@changeset-bot

changeset-bot Bot commented Sep 8, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: da533aa

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 7 packages
Name Type
@evervault/browser Patch
@evervault/inputs Patch
example-apple-pay Patch
example-react-google-wallet Patch
@evervault/browser-e2e-tests Patch
e2e-tests-ui-components-vanilla-server Patch
@evervault/inputs-e2e-tests Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@alexander-rw

Copy link
Copy Markdown
Contributor Author

Folded into #1012 — the res.ok commit da533aa4 is already in that branch's history, and #1012 now targets master directly as a single PR. Closing this rather than keeping the stack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant