# How to pass job worker bpmn errorMessage to error event subprocess

**URL:** <https://forum.camunda.io/t/how-to-pass-job-worker-bpmn-errormessage-to-error-event-subprocess/50050>\
**Category:** Camunda 8 Topics\
**Created:** [January 22, 2024, 9:56am UTC](https://forum.camunda.io/t/how-to-pass-job-worker-bpmn-errormessage-to-error-event-subprocess/50050 "2024-01-22T09:56:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![JG2023](https://forum.camunda.io/user_avatar/forum.camunda.io/jg2023/32/26078_2.png) [@JG2023](https://forum.camunda.io/u/JG2023)\
**Post date:** [January 22, 2024, 9:56am UTC](https://forum.camunda.io/t/how-to-pass-job-worker-bpmn-errormessage-to-error-event-subprocess/50050/1 "2024-01-22T09:56:32Z")

</div>

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. ");`

 ![Screenshot 2024-01-22 at 3.25.01 PM](https://forum.camunda.io/uploads/default/original/3X/6/4/640fad22909245b846a08b6e57e8cf72ec2348f5.png)

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

Please advice.

Thanks.

---

<div class="post-metadata">

**Author:** ![nathan.loding](https://forum.camunda.io/user_avatar/forum.camunda.io/nathan.loding/32/24171_2.png) [@nathan.loding](https://forum.camunda.io/u/nathan.loding)\
**Post date:** [January 22, 2024, 7:55pm UTC](https://forum.camunda.io/t/how-to-pass-job-worker-bpmn-errormessage-to-error-event-subprocess/50050/2 "2024-01-22T19:55:29Z")

</div>

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!)
