The \Elgentos\InventoryLog\Observer\RefundOrderInventoryObserver tries to load the product for every creditmemo item. If the product has been deleted, the ProductRepository will throw an exception, that is not caught in the observer. This results in an error where you can't refund this order.
Preconditions
Tested on Magento 2.4.2-p1 with version 1.1.4 of this extension
Steps to reproduce
Create an order
Create the invoice for the order
Delete a product of this order
Create a credit memo for the invoice, refunding the order
Expected result
The credit memo is created
The order is refunded
Actual result
The credit memo does not get created
The order is not refunded
Error message: "The product that was requested doesn't exist. Verify the product and try again."
Title
The \Elgentos\InventoryLog\Observer\RefundOrderInventoryObserver tries to load the product for every creditmemo item. If the product has been deleted, the ProductRepository will throw an exception, that is not caught in the observer. This results in an error where you can't refund this order.
Preconditions
Tested on Magento 2.4.2-p1 with version 1.1.4 of this extension
Steps to reproduce
Expected result
Actual result