mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged FILE-FOLDER-API (5.2.0) to HEAD (5.2)
122834 jkaabimofrad: RA-678: Modified the response, to return 409 rather than 400 when the rendition requested already exists. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@126513 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -32,6 +32,7 @@ import org.alfresco.rest.api.model.ContentInfo;
|
||||
import org.alfresco.rest.api.model.Rendition;
|
||||
import org.alfresco.rest.api.model.Rendition.RenditionStatus;
|
||||
import org.alfresco.rest.framework.core.exceptions.ApiException;
|
||||
import org.alfresco.rest.framework.core.exceptions.ConstraintViolatedException;
|
||||
import org.alfresco.rest.framework.core.exceptions.DisabledServiceException;
|
||||
import org.alfresco.rest.framework.core.exceptions.InvalidArgumentException;
|
||||
import org.alfresco.rest.framework.core.exceptions.NotFoundException;
|
||||
@@ -257,7 +258,7 @@ public class RenditionsImpl implements Renditions, ResourceLoaderAware
|
||||
final NodeRef renditionNodeRef = getRenditionByName(sourceNodeRef, rendition.getId(), parameters);
|
||||
if (renditionNodeRef != null)
|
||||
{
|
||||
throw new InvalidArgumentException(rendition.getId() + " rendition already exists.");
|
||||
throw new ConstraintViolatedException(rendition.getId() + " rendition already exists.");
|
||||
}
|
||||
|
||||
// Use the thumbnail registry to get the details of the thumbnail
|
||||
|
Reference in New Issue
Block a user