Skip to content

Commit

Permalink
fix(invoice): avoid failure on error not related to taxes
Browse files Browse the repository at this point in the history
  • Loading branch information
vincent-pochet committed Sep 12, 2024
1 parent 36110b5 commit f1f1aec
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/services/invoices/subscription_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,10 @@ def flag_lifetime_usage_for_refresh
end

def tax_error?(fee_result)
!fee_result.success? && fee_result&.error&.code == 'tax_error'
return false if fee_result.success?
return false unless fee_result.error.is_a?(BaseService::ServiceFailure)

fee_result&.error&.code == 'tax_error'
end
end
end

0 comments on commit f1f1aec

Please sign in to comment.