# Non-helpful error message when IP address already exists in list

**URL:** <https://meta.discourse.org/t/non-helpful-error-message-when-ip-address-already-exists-in-list/49893>\
**Category:** Bug\
**Created:** [2016年九月8日 14:56 UTC](https://meta.discourse.org/t/non-helpful-error-message-when-ip-address-already-exists-in-list/49893 "2016-09-08T14:56:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)\
**Post date:** [2016年九月8日 14:56 UTC](https://meta.discourse.org/t/non-helpful-error-message-when-ip-address-already-exists-in-list/49893/1 "2016-09-08T14:56:23Z")

</div>

**Update:** Turns out the IPs were already in the list, but searching for only the first byte of the address, not all 4 would have search say “no results”. The error message should instead inform you that the IP is on the list already, and searching with only the first 3 digits of the IP should work.

* * *

Our newest moderator didn’t read the delete user dialog properly and thus did not block IPs for a few of our recent spammers. I attempted to add them manually to the screened IP’s list, and got the non-descriptive error `Sorry, an error has occurred.`.

Looking at the console, I see the following:

```plaintext
ember_jquery-c9524b48466ee05bcf3f9ddaf05405387eb17017e61e90e76628f989db37eb4e.js:3 
POST
http://discourse.stonehearth.net/admin/logs/screened_ip_addresses.json
500 (Internal Server Error)
send @ ember_jquery-c9524b48466ee05bcf3f9ddaf05405387eb17017e61e90e76628f989db37eb4e.js:3
ajax @ ember_jquery-c9524b48466ee05bcf3f9ddaf05405387eb17017e61e90e76628f989db37eb4e.js:3
e @ application-68c6d08b0bee69dc1f8870c145e27753885b9d561bcef85076110e89ccf79c6e.js:1
_ @ ember_jquery-c9524b48466ee05bcf3f9ddaf05405387eb17017e61e90e76628f989db37eb4e.js:16
h @ ember_jquery-c9524b48466ee05bcf3f9ddaf05405387eb17017e61e90e76628f989db37eb4e.js:16
a @ application-68c6d08b0bee69dc1f8870c145e27753885b9d561bcef85076110e89ccf79c6e.js:1
value @ admin-6a4dbcad6f35782f7ee229b7692cac7097982d8bfe86e3c44a9315c0850af7db.js:1
submit @ admin-6a4dbcad6f35782f7ee229b7692cac7097982d8bfe86e3c44a9315c0850af7db.js:3
send @ ember_jquery-c9524b48466ee05bcf3f9ddaf05405387eb17017e61e90e76628f989db37eb4e.js:13
r @ ember_jquery-c9524b48466ee05bcf3f9ddaf05405387eb17017e61e90e76628f989db37eb4e.js:8
triggerAction @ ember_jquery-c9524b48466ee05bcf3f9ddaf05405387eb17017e61e90e76628f989db37eb4e.js:11
sendAction @ ember_jquery-c9524b48466ee05bcf3f9ddaf05405387eb17017e61e90e76628f989db37eb4e.js:13
value @ application-68c6d08b0bee69dc1f8870c145e27753885b9d561bcef85076110e89ccf79c6e.js:16
trigger @ ember_jquery-c9524b48466ee05bcf3f9ddaf05405387eb17017e61e90e76628f989db37eb4e.js:14
r @ ember_jquery-c9524b48466ee05bcf3f9ddaf05405387eb17017e61e90e76628f989db37eb4e.js:8
handleEvent @ ember_jquery-c9524b48466ee05bcf3f9ddaf05405387eb17017e61e90e76628f989db37eb4e.js:14
handleEvent @ ember_jquery-c9524b48466ee05bcf3f9ddaf05405387eb17017e61e90e76628f989db37eb4e.js:14
run @ ember_jquery-c9524b48466ee05bcf3f9ddaf05405387eb17017e61e90e76628f989db37eb4e.js:3
join @ ember_jquery-c9524b48466ee05bcf3f9ddaf05405387eb17017e61e90e76628f989db37eb4e.js:3
u.join @ ember_jquery-c9524b48466ee05bcf3f9ddaf05405387eb17017e61e90e76628f989db37eb4e.js:8
_bubbleEvent @ ember_jquery-c9524b48466ee05bcf3f9ddaf05405387eb17017e61e90e76628f989db37eb4e.js:13
(anonymous function) @ ember_jquery-c9524b48466ee05bcf3f9ddaf05405387eb17017e61e90e76628f989db37eb4e.js:13
dispatch @ ember_jquery-c9524b48466ee05bcf3f9ddaf05405387eb17017e61e90e76628f989db37eb4e.js:2
v.handle @ ember_jquery-c9524b48466ee05bcf3f9ddaf05405387eb17017e61e90e76628f989db37eb4e.js:2

```

---

<div class="post-metadata">

**Author:** ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)\
**Post date:** [2016年九月8日 15:12 UTC](https://meta.discourse.org/t/non-helpful-error-message-when-ip-address-already-exists-in-list/49893/2 "2016-09-08T15:12:27Z")

</div>

Chances are, it already exists in the list then. Or is captured via a Rollup rule. As I can add new IPs just fine on my sandbox instance.

See if searching for the IP makes it show up, and then gradually remove parts of the IP to check if there are rollup rules

---

<div class="post-metadata">

**Author:** ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)\
**Post date:** [2016年九月8日 15:12 UTC](https://meta.discourse.org/t/non-helpful-error-message-when-ip-address-already-exists-in-list/49893/3 "2016-09-08T15:12:57Z")

</div>

~~Could it be that I’m a moderator?~~

Scratch that, they’re already on the list. Interestingly searching for the first 8 bytes of the address only failed - but they’re there. Need a better error message here!
