-
Notifications
You must be signed in to change notification settings - Fork 764
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
Add request-specific fields from raw error to top level error #699
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ptal @richardm-stripe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
Oops, probably should have |
We should probably document this somewhere. https://github.com/stripe/stripe-node/wiki/Error-Handling at a minimum, perhaps also at stripe.com/docs/api |
All properties except statusCode were added in version 7.10.0: stripe/stripe-node#699
All properties except statusCode were added in version 7.10.0: stripe/stripe-node#699
* Remove seemingly unintentional property on StripeError It looks like this was supposed to contain a property name after the readonly keywork, bu instead StripeError now has a property named readonly. * Add missing properties to StripeError All properties except statusCode were added in version 7.10.0: stripe/stripe-node#699 * Update stripe version number
* Remove seemingly unintentional property on StripeError It looks like this was supposed to contain a property name after the readonly keywork, bu instead StripeError now has a property named readonly. * Add missing properties to StripeError All properties except statusCode were added in version 7.10.0: stripe/stripe-node#699 * Update stripe version number
…ode-dependencies ## Description **react** and **react-dom** updated from **16.9.0 to 16.12.0** ###### React DOM * Remove `unstable_createRoot` and `unstable_createSyncRoot` experimental APIs. (These are available in the Experimental channel as `createRoot` and `createSyncRoot`.) ([@acdlite] * Clear additional fiber fields during unmount to save memory. ([@trueadm](http://github.com/trueadm) in [#16807](facebook/react#16807)) * Prefer `Object.is` instead of inline polyfill, when available. ([@ku8ar](http://github.com/ku8ar) in [#16212](facebook/react#16212)) **react-scripts** updated from **16.9.0 to 16.12.0** https://github.com/facebook/create-react-app/blob/master/CHANGELOG.md **dotenv** updated from **8.1.0 to 8.2.0** https://github.com/motdotla/dotenv/blob/master/CHANGELOG.md ---> no changes in changelog **stripe** updated from **7.9.1 to 7.14.0** - [#699](stripe/stripe-node#699) Add request-specific fields from raw error to top level error - [#719](stripe/stripe-node#719) Define 'type' as a property on errors rather than a getter - [#728](stripe/stripe-node#728) Remove duplicate export ## Related Issue [ch1243] ## Motivation and Context We want our dependencies up to date ## How Has This Been Tested? Running `yarn test` all tests passed ## Types of changes - Chore (non-breaking change which refactors / improves the existing code base) - ~Bug fix (non-breaking change which fixes an issue)~ - ~New feature (non-breaking change which adds functionality)~ - ~Breaking change (fix or feature that would cause existing functionality to change)~ ## Checklist: - ✅ My code follows the code style of this project. - 🔴 My change requires a change to the documentation. - 🔴 I have updated the documentation accordingly. - ✅ I have read the [**CONTRIBUTING**][CONTRIBUTING_FILE] document. - 🔴 I have added tests to cover my changes. - ✅ All new and existing tests passed. [CONTRIBUTING_FILE]: https://github.com/fewlinesco/connect/blob/master/CONTRIBUTING.md
Per request of @remi-stripe (https://jira.corp.stripe.com/secure/RapidBoard.jspa?rapidView=1346&projectKey=DX&view=planning&selectedIssue=DX-4753&quickFilter=3988)
It is sometimes important to access properties such as
error.raw.payment_intent
,error.raw.payment_method
, etc. But "raw" means "here be dragons, don't rely on anything here". This PR copies these properties fromraw
to the top level error object, to indicate that they are properly part of our interface and remove the need for users to access "raw".