# Exception in webhook admin UI

**URL:** <https://meta.discourse.org/t/exception-in-webhook-admin-ui/102501>\
**Category:** Bug\
**Created:** [November 21, 2018, 10:49pm UTC](https://meta.discourse.org/t/exception-in-webhook-admin-ui/102501 "2018-11-21T22:49:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)\
**Post date:** [November 21, 2018, 10:49pm UTC](https://meta.discourse.org/t/exception-in-webhook-admin-ui/102501/1 "2018-11-21T22:49:00Z")

</div>

Since the removal of various \_.underscore methods, I’ve been noticing a few `null` exceptions, some may be something I need to address in my plugins, but there’s at least one in core:

1. Navigate to `/admin/api/web_hooks/new`

2. An exception is thrown.

```plaintext
TypeError: Cannot read property 'forEach' of undefined
at Function.findByIds (discourse/models/category:232)

```

See [DEV: removes \_.each from codebase (#6629) · discourse/discourse@9672c92 · GitHub](https://github.com/discourse/discourse/commit/9672c92045f31cc47976518d22137015722805d6#diff-d41231bde8cb5d18070eb38dcbee151eR262) and comments.

@j.jaffeux

ps. @pfaffman

---

<div class="post-metadata">

**Author:** ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)\
**Post date:** [November 21, 2018, 11:16pm UTC](https://meta.discourse.org/t/exception-in-webhook-admin-ui/102501/3 "2018-11-21T23:16:26Z")

</div>

Yes will fix it tomorrow and maybe write a test for this too. I didnt want to check for niull everywhere. 👍🏻

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [November 21, 2018, 11:17pm UTC](https://meta.discourse.org/t/exception-in-webhook-admin-ui/102501/4 "2018-11-21T23:17:44Z")

</div>

There is already an open bug for this assigned to @vinothkannans

---

<div class="post-metadata">

**Author:** ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)\
**Post date:** [November 22, 2018, 7:28am UTC](https://meta.discourse.org/t/exception-in-webhook-admin-ui/102501/6 "2018-11-22T07:28:46Z")

</div>

This is fixed as per commit

[https://github.com/discourse/discourse/commit/036790d13c728e9d30223f0079d539b4de203e7f](https://github.com/discourse/discourse/commit/036790d13c728e9d30223f0079d539b4de203e7f)

---

<div class="post-metadata">

**Author:** ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)\
**Post date:** [November 22, 2018, 7:28am UTC](https://meta.discourse.org/t/exception-in-webhook-admin-ui/102501/7 "2018-11-22T07:28:59Z")

</div>


