How to pass job worker bpmn errorMessage to error event subprocess

I have a job worker which is throwing ZeebeBpmnError with errorCode and error message as following and I have a event subprocess setup with starting as “error start event”. It is entering error start event but it is not able to get the error message

throw new ZeebeBpmnError("error", "one or more variables not present. ");

“Catch all workers” is a service task where i tried printing variables and it doesn’t print anything.

Please advice.

Thanks.

Hi @JG2023 - the error variables are passed to the task but aren’t automatically propagated to the process level. Because the task is terminated first before the catch event, I think you can use the output mapping to map a variable to the process scope. (I haven’t tested this, so I could be wrong!)