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

Chain Errors #715

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

davidbarratt
Copy link

@davidbarratt davidbarratt commented Feb 4, 2025

Summary & motivation

Currently Stripe is swallowing the underlying errors and returning a generic error:

Failed to load Stripe.js

reject(new Error('Failed to load Stripe.js'));

This can make it difficult to debug since every error gets reported the same way.

Since every JavaScript runtime now supports chaining errors, we could also chain errors here.

Testing & documentation

Unfortunately this change requires at least TypeScript 4.8 (change) (change) I was forced to upgrade it to at least that in order to get the tests to pass.

Copy link

cla-assistant bot commented Feb 4, 2025

CLA assistant check
All committers have signed the CLA.

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.

1 participant