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

Avoid breaking Calculator when avalara_response is not a hash #177

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cesartalves
Copy link

I ran on a scenario where the avalara_response would not be nil but not be a Hash either when the request failed - causing a cryptic undefined method :each for nil class up the stack. It was related to imported Orders that tried to calculate tax with Avalara.

In any case, this is just a naive fix, but it should hopefully save some headache from people that encounter something similar in the future.

I ran on a scenario where the `avalara_response` would not be `nil` but not be a Hash either when the request failed - causing a cryptic `undefined method :each for nil class` up the stack. It was related to imported Orders that tried to calculate tax with Avalara.

In any case, this is just a naive fix, but it should hopefully save some headache from people that encounter something similar in the future.
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

Successfully merging this pull request may close these issues.

1 participant