Fix inactive/non-existent cart handling by re-adding GraphQL error category extension @package magento/framework Index: GraphQl/Exception/GraphQlNoSuchEntityException.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/GraphQl/Exception/GraphQlNoSuchEntityException.php b/GraphQl/Exception/GraphQlNoSuchEntityException.php --- a/GraphQl/Exception/GraphQlNoSuchEntityException.php +++ b/GraphQl/Exception/GraphQlNoSuchEntityException.php (date 1698390008711) @@ -7,6 +7,8 @@ namespace Magento\Framework\GraphQl\Exception; +use GraphQL\Error\ClientAware; +use GraphQL\Error\ProvidesExtensions; use Magento\Framework\Exception\NoSuchEntityException; use Magento\Framework\Phrase; @@ -15,7 +17,7 @@ * * @api */ -class GraphQlNoSuchEntityException extends NoSuchEntityException implements \GraphQL\Error\ClientAware +class GraphQlNoSuchEntityException extends NoSuchEntityException implements ClientAware, ProvidesExtensions { const EXCEPTION_CATEGORY = 'graphql-no-such-entity'; @@ -53,4 +55,15 @@ { return self::EXCEPTION_CATEGORY; } + + /** + * Get error category + * + * @return array + */ + public function getExtensions(): array + { + $exceptionCategory['category'] = $this->getCategory(); + return $exceptionCategory; + } }