Log in
Interface

DocumentValidationExceptionInterface

Magento\Sales\Api\Exception\DocumentValidationExceptionInterface

What it does

This interface serves as a marker for exceptions thrown during sales document validation in Magento 2.

Developers use this to identify and catch validation errors specifically related to sales documents like orders, invoices, shipments, and credit memos.

When creating custom validation logic for sales documents, exceptions should implement this interface to maintain consistency with Magento's exception handling system.