mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Merge branch 'feature/RM-4375_WrongErrorForDuplicateRMIdentifier' into 'master'
Feature/rm 4375 wrong error for duplicate rm identifier RM-4375 - Handling duplicate "rma:identifier" values in POST /fileplan-components/{fileplanComponentId}/children DuplicateAttributeException was not mapped to an error code in core. I extended the exception mapper so we ca add our custom mapping. See merge request !643
This commit is contained in:
@@ -77,4 +77,17 @@
|
||||
<bean class="org.alfresco.rm.rest.api.sites.RMSiteEntityResource">
|
||||
<property name="sites" ref="rm.Sites" />
|
||||
</bean>
|
||||
|
||||
<!-- Map RM exceptions to HTML status codes -->
|
||||
<bean id="rm.simpleMappingExceptionResolver" abstract="true" parent="simpleMappingExceptionResolver">
|
||||
<property name="exceptionMappings">
|
||||
<map merge="true">
|
||||
<entry key="org.alfresco.service.cmr.attributes.DuplicateAttributeException" value="#{T(org.springframework.extensions.webscripts.Status).STATUS_CONFLICT}" />
|
||||
</map>
|
||||
</property>
|
||||
</bean>
|
||||
<bean class="org.alfresco.util.BeanExtender">
|
||||
<property name="beanName" value="simpleMappingExceptionResolver"/>
|
||||
<property name="extendingBeanName" value="rm.simpleMappingExceptionResolver"/>
|
||||
</bean>
|
||||
</beans>
|
Reference in New Issue
Block a user