Updates to PR based on Review

This commit is contained in:
Niels Hartvig
2017-01-10 12:47:00 +01:00
parent 1a9f336a59
commit f75e0cf4ba
3 changed files with 8 additions and 8 deletions

View File

@@ -131,7 +131,7 @@ namespace Umbraco.Web.Trees
var idEntity = GetEntityFromId(id);
if (idEntity == null)
{
throw new EntityNotFoundException(id, "The passed id doesn't exist");
throw new HttpResponseException(HttpStatusCode.NotFound);
}
iid = idEntity.Id;
}
@@ -323,7 +323,7 @@ namespace Umbraco.Web.Trees
}
else
{
throw new InvalidCastException("Id must be either an integer or a Guid");
return null;
}
return entity;