-
Notifications
You must be signed in to change notification settings - Fork 6
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
Conversation
src/error.rs
Outdated
AccountAlreadyExists, | ||
AccountCountryInvalidAddress, | ||
AccountInvalid, | ||
StripeAccount, |
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.
I can't find this error code (stripe_account
) in the Stripe documentation.
src/error.rs
Outdated
TokenInUse, | ||
TransfersNotAllowed, | ||
UpstreamOrderCreationFailed, | ||
UrlInvalid | ||
} |
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.
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, |
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.
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, |
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.
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, |
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.
Cannot find a legal_entity
error code in the stripe documentation
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.
indeed, my bad, will fix this (I extracted the error code from the page with some JS code :))
Published in v0.4.7 |
resource_missing was... missing (tadum tiss)
and thus I added every other error code (based on https://stripe.com/docs/error-codes)