Summary: Shipment for order cannot be created via REST API if order's quote is deleted
Steps to reproduce:
- Create order
- Delete it's quote(cart) or wait for it to be automatically deleted
- Call POST rest/V1/order/{created order id}/ship
Expected result:
Shipment is created, or any detailed error message should be returned.
Actual result:
Generic "Could not save a shipment, see error log for details" message appears. In exception log we can find following error:
[2025-11-18T13:42:52.650672+00:00] main.CRITICAL: Magento\Framework\Exception\NoSuchEntityException: No such entity with cartId = 2277435 in /xxx/vendor/magento/framework/Exception/NoSuchEntityException.php:50
Stack trace:
#0 /xxx/vendor/magento/module-quote/Model/QuoteRepository.php(238): Magento\Framework\Exception\NoSuchEntityException::singleField()
#1 /xxx/vendor/magento/module-quote/Model/QuoteRepository.php(136): Magento\Quote\Model\QuoteRepository->loadQuote()
#2 /xxx/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Quote\Model\QuoteRepository->get()
#3 /xxx/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Quote\Model\QuoteRepository\Interceptor->___callParent()
#4 /xxx/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Quote\Model\QuoteRepository\Interceptor->Magento\Framework\Interception\{closure}()
#5 /xxx/generated/code/Magento/Quote/Model/QuoteRepository/Interceptor.php(23): Magento\Quote\Model\QuoteRepository\Interceptor->___callPlugins()
#6 /xxx/vendor/breadfinance/module-breadcheckout/Observer/SaveBreadApiVersionObserver.php(62): Magento\Quote\Model\QuoteRepository\Interceptor->get()
Environment:
Magento 2.4.6-p4
Severity:
Major (Prevents any third-party shipment integration)
Priority:
High (Should be addressed quickly due to impact on third party integrations)
Additional Information:
Summary: Shipment for order cannot be created via REST API if order's quote is deleted
Steps to reproduce:
Expected result:
Shipment is created, or any detailed error message should be returned.
Actual result:
Generic "Could not save a shipment, see error log for details" message appears. In exception log we can find following error:
Environment:
Magento 2.4.6-p4
Severity:
Major (Prevents any third-party shipment integration)
Priority:
High (Should be addressed quickly due to impact on third party integrations)
Additional Information: