We are encountering an error when trying to generate an invoice for an account. The system returns the following:
{
"className": "org.killbill.billing.invoice.api.InvoiceApiException",
"code": 4,
"message": "ILLEGAL INVOICING STATE accountItemTree=AccountItemTree{subscriptionItemTree={e43b75d6-dbc8-4838-9f2d-689a0506f905=SubscriptionItemTree{targetInvoiceId=5e64cc8c-53e6-4846-976b-df68fabe89df, subscriptionId=e43b75d6-dbc8-4838-9f2d-689a0506f905, root=ItemsNodeInterval{items=ItemsInterval{items=[]}}, isBuilt=false, isMerged=false, items=[], existingIgnoredItems=[FIXED{productName='DTVGO_BR_Base', planName='PL_DTVGO_BR_Base-SKY1MOFF24', phaseName='PL_DTVGO_BR_Base-SKY1MOFF24-trial', usageName='null', startDate=2024-07-17, endDate=2024-07-24, amount=0.00, subscriptionId=e43b75d6-dbc8-4838-9f2d-689a0506f905, rate=null, linkedItemId=null}], remainingIgnoredItems=[], pendingItemAdj=[]}, 126da74a-7f8a-4263-ab71-b38415990bdc=SubscriptionItemTree{targetInvoiceId=5e64cc8c-53e6-4846-976b-df68fabe89df, subscriptionId=126da74a-7f8a-4263-ab71-b38415990bdc, root=ItemsNodeInterval{items=ItemsInterval{items=[]}}, isBuilt=false, isMerged=false, items=[], existingIgnoredItems=[], remainingIgnoredItems=[], pendingItemAdj=[]}}}",
"causeClassName": "java.lang.IllegalStateException",
"causeMessage": "Expected existing node to have only one item",
"stackTrace": []
}
Could you please advise on the cause and suggest how we can resolve this state or validate the subscriptions before attempting invoice generation again?