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

Bad Zipcodes Raise Exceptions in Checkout #51

Open
brchristian opened this issue Dec 2, 2020 · 0 comments
Open

Bad Zipcodes Raise Exceptions in Checkout #51

brchristian opened this issue Dec 2, 2020 · 0 comments

Comments

@brchristian
Copy link
Collaborator

Currently if a user has Solidus::TaxCloud installed and checks out with a bad zip code - namely a zip code that does not exist in that US state, for instance 19130 in Rhode Island - the checkout flow will fail with an exception.

Ideally we should simply halt the checkout at the current step and display a error message attached to the form.

Is there a best practice for how to rescue TaxCloud::Errors::ApiError and return its error message attached to the address input form?

I know that in ActiveMerchant there is a pattern like

rescue Stripe::CardError => error
  payment.send(:gateway_error, error.message)
end

Is is possible to do something similar here but with the billing and shipping address step, rather than the payment step?

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

No branches or pull requests

1 participant