reactioncommerce / reaction

Mailchimp Open Commerce is an API-first, headless commerce platform built using Node.js, React, GraphQL. Deployed via Docker and Kubernetes.
https://mailchimp.com/developer/open-commerce/
GNU General Public License v3.0
12.34k stars 2.17k forks source link

Better console error handling for Stripe #1117

Closed brent-hoover closed 6 years ago

brent-hoover commented 8 years ago

Migrated from Stripe repository

While testing some of the cards that Stripe should throw an error on, I do get error handling server and client but also throw some big ugliness. would be good to capture this better.

4000000000000002    Charge will be declined with a card_declined code.
4100000000000019    Charge will be declined with a card_declined code and a fraudulent reason.
4000000000000127    Charge will be declined with an incorrect_cvc code.
4000000000000069    Charge will be declined with an expired_card code.
4000000000000119            Charge will be declined with a processing_error code.
23:29:59.904Z  WARN Reaction: Received unexpected error code: processing_error
23:29:59.904Z  WARN Reaction: An error occurred while processing your card. Try again in a little bit.
  Error: An error occurred while processing your card. Try again in a little bit.
      at Error._Error (/Users/aaronjudd/ongoworks/reaction/.meteor/local/isopacks/reactioncommerce_reaction-stripe/npm/node_modules/stripe/lib/Error.js:12:17)
      at Error.Constructor (/Users/aaronjudd/ongoworks/reaction/.meteor/local/isopacks/reactioncommerce_reaction-stripe/npm/node_modules/stripe/lib/utils.js:105:13)
      at Error.Constructor (/Users/aaronjudd/ongoworks/reaction/.meteor/local/isopacks/reactioncommerce_reaction-stripe/npm/node_modules/stripe/lib/utils.js:105:13)
      at Function.StripeError.generate (/Users/aaronjudd/ongoworks/reaction/.meteor/local/isopacks/reactioncommerce_reaction-stripe/npm/node_modules/stripe/lib/Error.js:54:14)
      at IncomingMessage.<anonymous> (/Users/aaronjudd/ongoworks/reaction/.meteor/local/isopacks/reactioncommerce_reaction-stripe/npm/node_modules/stripe/lib/StripeResource.js:138:39)
      at IncomingMessage.emit (events.js:117:20)
      at _stream_readable.js:944:16
      at process._tickCallback (node.js:458:13)
aaronjudd commented 7 years ago

@zenweasel is this still relevant?

brent-hoover commented 6 years ago

This has already been fixed.