Catch and return exception in service task via REST API

Hi everyone,

this is my first post in Camunda forum. I have a maker checker BPMN diagram as follow.

I am able to call REST API to complete the user task (Checker Task), I would like to ask how to catch and return the error message via REST API if there’s exception being thrown in the service task (Store in master table or do nothing). Please let me know if my current workflow design is wrong.

Thank you.

It depends on how exactly your running the code in the service task - Can you explain if you’re running a java class or you’re using an external task.

If you’re running java code please post it up and explain how you’d like the error to be caught.