mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
RM-4375 - extended the exception mapper from core to map our custom exceptions to HTTP error codes
This commit is contained in:
@@ -77,4 +77,17 @@
|
|||||||
<bean class="org.alfresco.rm.rest.api.sites.RMSiteEntityResource">
|
<bean class="org.alfresco.rm.rest.api.sites.RMSiteEntityResource">
|
||||||
<property name="sites" ref="rm.Sites" />
|
<property name="sites" ref="rm.Sites" />
|
||||||
</bean>
|
</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>
|
</beans>
|
Reference in New Issue
Block a user