# How to catch event 50139 in a RAPID program

**URL:** <https://tech-community.robotics.abb.com/t/how-to-catch-event-50139-in-a-rapid-program/15017>\
**Category:** RAPID Programming\
**Tags:** error-handling\
**Created:** [June 17, 2026, 2:30am UTC](https://tech-community.robotics.abb.com/t/how-to-catch-event-50139-in-a-rapid-program/15017 "2026-06-17T02:30:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bamboo\_wu](https://avatars.discourse-cdn.com/v4/letter/b/43a26b/32.png) [@bamboo\_wu](https://tech-community.robotics.abb.com/u/bamboo_wu)\
**Post date:** [June 17, 2026, 2:30am UTC](https://tech-community.robotics.abb.com/t/how-to-catch-event-50139-in-a-rapid-program/15017/1 "2026-06-17T02:30:10Z")

</div>

When a RAPID program makes the robot arm grab a specific target, while waiting for the gripper to close, the robot arm keeps moving forward with the conveyor, which maybe trigger a 50139 event and stop. I want to catch the 50139 error in the RAPID program, then clear the error and move arm to a safe position.

How should I do this?
