# "Sorry, An error has occurred" when changing a badge sql trigger to "When a user is edited or created"

**URL:** <https://meta.discourse.org/t/sorry-an-error-has-occurred-when-changing-a-badge-sql-trigger-to-when-a-user-is-edited-or-created/29061>\
**Category:** Bug\
**Created:** [21 مايو 2015، 7:46ص UTC](https://meta.discourse.org/t/sorry-an-error-has-occurred-when-changing-a-badge-sql-trigger-to-when-a-user-is-edited-or-created/29061 "2015-05-21T07:46:32Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![db0](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/db0/32/116141_2.png) [@db0](https://meta.discourse.org/u/db0)\
**Post date:** [21 مايو 2015، 7:46ص UTC](https://meta.discourse.org/t/sorry-an-error-has-occurred-when-changing-a-badge-sql-trigger-to-when-a-user-is-edited-or-created/29061/1 "2015-05-21T07:46:32Z")

</div>

I’ve created a new badge which is assigned when a user fill out a custom field. Unfortunately if I set the SQL to trigger when they edit their profile, I get this pop-up. Setting it to query daily works.

I checked for error logs but there seems to be nothing there.

---

_[View the full topic](https://meta.discourse.org/t/sorry-an-error-has-occurred-when-changing-a-badge-sql-trigger-to-when-a-user-is-edited-or-created/29061)._
