REPO-1536: corrected 404 error message for get person by ID (/person/{id})

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@132473 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Matt Ward
2016-11-07 13:06:24 +00:00
parent b4aed89bde
commit ba44c5f4b2

View File

@@ -153,8 +153,9 @@ public class PeopleImpl implements People
return validatePerson(personId, false);
}
public String validatePerson(String personId, boolean validateIsCurrentUser)
public String validatePerson(final String requestedPersonId, boolean validateIsCurrentUser)
{
String personId = requestedPersonId;
if(personId == null)
{
throw new InvalidArgumentException("personId is null.");
@@ -168,8 +169,8 @@ public class PeopleImpl implements People
personId = personService.getUserIdentifier(personId);
if(personId == null)
{
// "User " + personId + " does not exist"
throw new EntityNotFoundException("personId is null.");
// Could not find canonical user ID by case-sensitive ID.
throw new EntityNotFoundException(requestedPersonId);
}
if(validateIsCurrentUser)