I try to use event based gateways with a service task. If the service task is throwing an exception, the client recieves a http status 500. This error can’t be catched. I already implemented an error handling saga like here: GetA12 Login. It is succesfully catching most error events, but the http status 500 is completely ignored.
So how to catch that?
The response body of the 500 request is the following:
{"code":0,"message":"[foefi_003]","data":null}
The approach in the Tree Engine docs relies on BAP Client’s ActivityActions.error so it only handles those, as indicated by
takeEvery((anyAction: AnyAction) => ActivityActions.error.match(anyAction) ...
In Workflows, we have specific WorkflowsActions, for instance WorkflowsActions.processEvent for the events.
Could you verify in the Redux dev tools that WorkflowsActions.processEvent.failed is dispatched in your error case (it should)? You could then handle this Workflows.processEvent.failed action similar to how you’re handling ActivityActions.error.
Let me know if this approach is feasible.
WorkflowsActions.processEvent.failed is not dispatched. Please see attached image.

Also the http status is now 404. We changed it only for tests. The default status thrown by the workflows service is 404.
This is the same bug covered in A12-14017 and we will release a fix soon in 8.1.x, probably 8.1.2.