cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Overwrite default exception handling message in product cockpit

gothiquo
Associate
Associate
0 Kudos
317

Hi all,

I have a workflow where a user should update a product.

When setting the workflow decision to approved, an exception is thrown by me from the code (see screenshot below)

The text is standard and I am trying to overwrite it with my exception's text using ExceptionTranslationHandler, however I tried it many times but the exception was never caught.

Here is my code:

<alias name="defaultExceptionTranslationService" alias="exceptionTranslationService"/>
<bean id="defaultExceptionTranslationService"
class="com.hybris.cockpitng.service.impl.DefaultExceptionTranslationService">
<property name="defaultHandler">
<bean class="com.hybris.cockpitng.service.impl.DefaultExceptionTranslationHandler"/>
</property>
<property name="exceptionHandlers">
<list>
<bean class="com.my.package.backoffice.handlers.MyCustomTranslationHandler"/>
</list>
</property>
</bean>

Any idea?

Thanks in advance.

Accepted Solutions (0)

Answers (0)