# JS\_EXECUTION\_ERROR how to ignore / bypass javascript error

**URL:** <https://community.dynatrace.com/t/js-execution-error-how-to-ignore-bypass-javascript-error/46031>\
**Category:** Synthetic Monitoring\
**Tags:** javascript, synthetic-monitoring\
**Created:** [June 10, 2024, 10:05pm UTC](https://community.dynatrace.com/t/js-execution-error-how-to-ignore-bypass-javascript-error/46031 "2024-06-10T22:05:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sunny2205](https://avatars.discourse-cdn.com/v4/letter/s/a9adbd/32.png) [@sunny2205](https://community.dynatrace.com/u/sunny2205)\
**Post date:** [June 10, 2024, 10:05pm UTC](https://community.dynatrace.com/t/js-execution-error-how-to-ignore-bypass-javascript-error/46031/1 "2024-06-10T22:05:38Z")

</div>

Im trying to a write a Javascript for a synthetic monitor step, Could someone help me how to ignore this exception

Errorsof Exception was thrown by the JavaScript code: Cannot read properties of undefined (reading ‘innerText’)

---

<div class="post-metadata">

**Author:** ![hannahmac](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/hannahmac/32/41823_2.png) [@hannahmac](https://community.dynatrace.com/u/hannahmac)\
**Post date:** [June 26, 2024, 8:41am UTC](https://community.dynatrace.com/t/js-execution-error-how-to-ignore-bypass-javascript-error/46031/2 "2024-06-26T08:41:40Z")

</div>

You can’t ignore JavaScript exceptions, you need to fix the code in the JavaScript event. This error message looks like you are trying to get the innerText from an element that does not exist. I would check on the element you are using.
