From 80d27de1f827de8d42944b5d03bae5d6f0beeebc Mon Sep 17 00:00:00 2001 From: Jamal Kaabi-Mofrad Date: Tue, 10 May 2016 11:38:47 +0000 Subject: [PATCH] Merged FILE-FOLDER-API (5.2.0) to HEAD (5.2) 124741 jkaabimofrad: RA-895: fixed the error message when the relativePath does not exist. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@126582 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- source/java/org/alfresco/rest/api/impl/NodesImpl.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/source/java/org/alfresco/rest/api/impl/NodesImpl.java b/source/java/org/alfresco/rest/api/impl/NodesImpl.java index 41e7336c6a..f2f12c0bab 100644 --- a/source/java/org/alfresco/rest/api/impl/NodesImpl.java +++ b/source/java/org/alfresco/rest/api/impl/NodesImpl.java @@ -662,7 +662,6 @@ public class NodesImpl implements Nodes */ } - FileInfo fileInfo = null; try { @@ -675,14 +674,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();