diff --git a/src/contracts/Repository/Exceptions/ContentTypeOwnedBySomeoneElseException.php b/src/contracts/Repository/Exceptions/ContentTypeOwnedBySomeoneElseException.php new file mode 100644 index 0000000000..84e4abeae7 --- /dev/null +++ b/src/contracts/Repository/Exceptions/ContentTypeOwnedBySomeoneElseException.php @@ -0,0 +1,13 @@ +modifierId != $this->permissionResolver->getCurrentUserReference()->getUserId()) { - throw new NotFoundException('The content type is owned by someone else', $contentTypeId); + throw new ContentTypeOwnedBySomeoneElseException($contentTypeId); } return $this->contentTypeDomainMapper->buildContentTypeDraftDomainObject($spiContentType);