Skip to content
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

Capture errors when there is an Apple Pay error. #905

Open
ShaunDychko opened this issue Sep 29, 2023 · 1 comment
Open

Capture errors when there is an Apple Pay error. #905

ShaunDychko opened this issue Sep 29, 2023 · 1 comment
Labels

Comments

@ShaunDychko
Copy link

ShaunDychko commented Sep 29, 2023

General information

  • SDK/Library version: 1.35.0
  • Environment: Sandbox
  • Browser and OS: Safari 17.0 on MacOS Ventura 13.6

Issue description

When testing Apple Pay in the sandbox environment the Dropin UI displays the error "Something went wrong on our end" and the browser console shows "[Error] Failed to load resource: the server responded with a status of 422 ()" for the URL https://api.sandbox.braintreegateway.com/merchants/[redacted]/client_api/v1/apple_pay_web/sessions after clicking the Apple Pay icon. I assume the error has to do with only real credit cards in my Apple Wallet and they won't work in a sandbox environment. My question is how can I capture these errors and log them (to Sentry in my case)? The catch block of requestPaymentMethod() doesn't get invoked since this error occurs before executing requestPaymentMethod().

@jplukarski
Copy link
Contributor

Hey @ShaunDychko, you are correct about the reason for that error; you need to use a sandbox iCloud account for testing in the sandbox.

We'll make a ticket in our backlog for better error handling for this issue. For internal tracking -> 3079

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants