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

fix: support every Stripe error code #15

Merged
merged 3 commits into from
Jun 11, 2018
Merged

fix: support every Stripe error code #15

merged 3 commits into from
Jun 11, 2018

Conversation

FGRibreau
Copy link
Contributor

@FGRibreau FGRibreau commented Jun 10, 2018

resource_missing was... missing (tadum tiss)

and thus I added every other error code (based on https://stripe.com/docs/error-codes)

@FGRibreau FGRibreau changed the title fix: add every Stripe error code https://stripe.com/docs/error-codes fix: add every Stripe error code Jun 10, 2018
@FGRibreau FGRibreau changed the title fix: add every Stripe error code fix: support every Stripe error code Jun 10, 2018
src/error.rs Outdated
AccountAlreadyExists,
AccountCountryInvalidAddress,
AccountInvalid,
StripeAccount,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't find this error code (stripe_account) in the Stripe documentation.

src/error.rs Outdated
TokenInUse,
TransfersNotAllowed,
UpstreamOrderCreationFailed,
UrlInvalid
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably worth using the #[doc(hidden)] __NonExhaustive pattern here since more error codes are likely in the future

src/error.rs Outdated
BankAccountUnverified,
BitcoinUpgradeRequired,
CardDeclined,
DeclineCode,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't believe there is a decline_code error code; Decline Codes appear to only be used on a ChargeOutcome.

src/error.rs Outdated
IncorrectZip,
CardDeclined,
Missing,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The generic missing error code was removed here, but still exists in the Stripe documentation
https://stripe.com/docs/error-codes#missing

(Should be added after LivemodeMismatch?)

src/error.rs Outdated
ShippingCalculationFailed,
SkuInactive,
StateUnsupported,
LegalEntity,
Copy link
Member

@kestred kestred Jun 11, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cannot find a legal_entity error code in the stripe documentation

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indeed, my bad, will fix this (I extracted the error code from the page with some JS code :))

@kestred kestred merged commit 90946ba into rapiditynetworks:master Jun 11, 2018
@kestred
Copy link
Member

kestred commented Jun 11, 2018

Published in v0.4.7

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.

None yet

2 participants