# Should I throw exceptions in a Trigger?

**URL:** <https://community.auth0.com/t/should-i-throw-exceptions-in-a-trigger/170286>\
**Category:** Get Help\
**Tags:** quickstarts-backend-api, sdks-quickstarts\
**Created:** [January 25, 2025, 4:12pm UTC](https://community.auth0.com/t/should-i-throw-exceptions-in-a-trigger/170286 "2025-01-25T16:12:25Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![VictorioBerra](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/victorioberra/32/28773_2.png) [@VictorioBerra](https://community.auth0.com/u/VictorioBerra)\
**Post date:** [January 26, 2025, 9:41pm UTC](https://community.auth0.com/t/should-i-throw-exceptions-in-a-trigger/170286/3 "2025-01-26T21:41:25Z")

</div>

> 1. It maintains better control flow

[I have another thread asking about this that no one replied to yet. Maybe you can answer it.](https://community.auth0.com/t/deny-plus-redirect-in-action-triggers/170287)

Essentially, can I call `api.access.deny()` anywhere in my code and essentially `process.exit(1)` happens? Because if I throw an Exception we come to a full stop and I dont have potentially undefined things being passed around (which ultimately leads to a less discoverable exception thrown).

---

_[View the full topic](https://community.auth0.com/t/should-i-throw-exceptions-in-a-trigger/170286)._
