diff --git a/app/services/invoices/subscription_service.rb b/app/services/invoices/subscription_service.rb index b7a99e62ec42..8efe9ff07e48 100644 --- a/app/services/invoices/subscription_service.rb +++ b/app/services/invoices/subscription_service.rb @@ -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