Avoid a redundant allocation in `InvoiceError` handling in one case