Bpmn catch error event - rest api

Hello friends. How can I catch an error code using the rest api?
Example Bpmn:

senMailAndSms.bpmn (8.4 KB)

@Niall can you help me ?

Sorry, i don’t really understand you’re question.
Can you give a few more details about what you’re trying to do and why you think this is the best option?

I want to run it with php using camunda rest api. If there is an error when the task completes, I need to catch it and get the error code, but I couldn’t figure out how to do it in the model. I found the way with such event subprocess but still I am not getting the error code. my english is bad sorry

Hi @dev18_dev18
I still have a few questions :slight_smile:

What kinds of errors are you expecting here? Technical, non-technical? Can you give me an example?

When you say “catch the error code” where do you want to catch it? Do you need to send it back to some PHP client?

I want to catch and return the errors that I reported with the Error end event. I used event subprocess for this. But I can’t catch the error using rest api

What do you mean by technical or non-technical?

@dev18_dev18

Technical errors: Application crash, Runtime errors, Downstream services unavailable (500), storage issues, etc.

Non-technical errors: Product not found, business criteria not met, application or request rejected, etc

For example,

  • when you book a flight ticket if tickets are not available or provided invalid card details to buy a ticket will be categorised as non technical errors or business errors.

  • What if you were not able to access the flight booking service itself, thus it categorised as technical errors.