diff --git a/core/modules/jsonapi/src/Exception/EntityAccessDeniedHttpException.php b/core/modules/jsonapi/src/Exception/EntityAccessDeniedHttpException.php index c227709900c16c1c316365a2649120cb5913ab85..74ab245e5114002bfe3a6ae1047b360cf2e42cfa 100644 --- a/core/modules/jsonapi/src/Exception/EntityAccessDeniedHttpException.php +++ b/core/modules/jsonapi/src/Exception/EntityAccessDeniedHttpException.php @@ -5,6 +5,7 @@ use Drupal\Core\Access\AccessResultInterface; use Drupal\Core\Access\AccessResultReasonInterface; use Drupal\Core\Cache\CacheableMetadata; +use Drupal\Core\DependencyInjection\DependencySerializationTrait; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Http\Exception\CacheableAccessDeniedHttpException; use Drupal\jsonapi\JsonApiResource\ResourceIdentifier; @@ -22,6 +23,7 @@ */ class EntityAccessDeniedHttpException extends CacheableAccessDeniedHttpException implements ResourceIdentifierInterface { + use DependencySerializationTrait; use ResourceIdentifierTrait; /** diff --git a/core/modules/jsonapi/src/Exception/UnprocessableHttpEntityException.php b/core/modules/jsonapi/src/Exception/UnprocessableHttpEntityException.php index eae202c553f18e6c128b5de2c6eead5e96a37e27..b9d5a6f58389ae5bb93b39134d7956cf077c1dba 100644 --- a/core/modules/jsonapi/src/Exception/UnprocessableHttpEntityException.php +++ b/core/modules/jsonapi/src/Exception/UnprocessableHttpEntityException.php @@ -3,6 +3,7 @@ namespace Drupal\jsonapi\Exception; use Drupal\Core\Entity\EntityConstraintViolationListInterface; +use Drupal\Core\DependencyInjection\DependencySerializationTrait; use Symfony\Component\HttpKernel\Exception\HttpException; /** @@ -22,6 +23,8 @@ */ class UnprocessableHttpEntityException extends HttpException { + use DependencySerializationTrait; + /** * The constraint violations associated with this exception. *