Skip to content

Commit

Permalink
make assertElementNotExist throw a 409
Browse files Browse the repository at this point in the history
Signed-off-by: jamal-khey <myjamal89@gmail.com>
  • Loading branch information
jamal-khey committed Sep 10, 2024
1 parent 26d70cd commit 03d9412
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@ public ElementAttributes duplicateElement(UUID elementId, UUID newElementId, UUI

private void assertElementNotExist(UUID parentDirectoryUuid, String elementName, String type) {
if (Boolean.TRUE.equals(repositoryService.isElementExists(parentDirectoryUuid, elementName, type))) {
throw new DirectoryException(NOT_ALLOWED);
throw DirectoryException.createElementNameExists(type, elementName);

}
}

Expand Down

0 comments on commit 03d9412

Please sign in to comment.