Orders::PreviewService result not containing invoices
Problem
Sentry Issue: CUSTOMERSDOT-12S
NoMethodError: undefined method `[]' for nil:NilClass (NoMethodError)
tax_amount: invoice[:tax_amount],
^^^^^^^^^^^^^
app/services/zuora/orders/preview_service.rb:89:in `invoice_attributes'
tax_amount: invoice[:tax_amount],
Proposal
Investigate whether the absence of :invoices
is valid, and determine the correct way to handle such case.
Result
Eliminate nil exception
Next steps (if any)
How will we measure success?
Edited by Mark Chao