diff --git a/source/java/org/alfresco/rest/api/impl/NodesImpl.java b/source/java/org/alfresco/rest/api/impl/NodesImpl.java index 7d697d7735..76db8aaf43 100644 --- a/source/java/org/alfresco/rest/api/impl/NodesImpl.java +++ b/source/java/org/alfresco/rest/api/impl/NodesImpl.java @@ -669,7 +669,6 @@ public class NodesImpl implements Nodes */ } - FileInfo fileInfo = null; try { @@ -682,14 +681,14 @@ public class NodesImpl implements Nodes fileInfo = fileFolderService.getFileInfo(parentNodeRef); if (fileInfo == null) { - throw new FileNotFoundException(parentNodeRef); + throw new EntityNotFoundException(parentNodeRef.getId()); } } } catch (FileNotFoundException fnfe) { // convert checked exception - throw new EntityNotFoundException(parentNodeRef.getId()); + throw new NotFoundException("The entity with relativePath: " + path + " was not found."); } return fileInfo.getNodeRef();