Exceptions with Empty Messages

SUGGESTED

Note the is a .NET application written in C#.

I have an application that imports orders, purchase orders and inventory items into Sage. The customer supplies a file that contains all of the purchase orders w/items. The file is parsed into purchase orders and inventory items. The customer does not keep an actual inventory so each item is added to the inventory with associated vendor/pricing information. The purchase orders are then created. The order is then created from the list of items on the purchase orders. The order is then "finalized" by adding some miscellaneous charges and setting the tax group to use Avalera. This all works perfectly.

At this point they can process a file that contains updates. This file just contain a diff of the "new" and "old" order. The file is parsed much like the original file except that there are "actions" associated with things. The actions include add items, modify items, delete items, add purchase orders and delete purchase orders. If follows similar logic as the original processing.

The problem.

Everything is appears to be processed correctly except there are exceptions thrown when when some items are deleted. The exception that is caught has the typical "Error HRESULT E_FAIL has been returned from a call to a COM component." message. At this point the session errors are examined. There are no entries that have a priority of Error. There sometimes are Warnings about "Information needed to set up the unit price does not exist for price list B, item MBRMET605380XSSP63877. The price list record may not exist, or details have not been entered to price multiple units of measure.". With regard to the warnings, non of them reference the item that is being deleted. The items mentioned are not adjacent to the item being deleted. At this point the processing continues and the updated order posts without errors. The result is not a correct order but there are no errors when the Update method is called.

I am at a loss as to how to attack this. If the item being deleted was referenced in the session errors list I would have something to work off of, but that is not the case.

Deleting the item in question in the UI works fine.

Any ideas?