# "Akismet" plugin always returns "Sorry, an error has occured." although everything works as expected

**URL:** https://meta.discourse.org/t/akismet-plugin-always-returns-sorry-an-error-has-occured-although-everything-works-as-expected/72672
**Category:** Bug
**Tags:** akismet
**Created:** [10월 24, 2017, 9:04오전 UTC](https://meta.discourse.org/t/akismet-plugin-always-returns-sorry-an-error-has-occured-although-everything-works-as-expected/72672 "2017-10-24T09:04:20Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Sujan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sujan/32/70979_2.png) [@Sujan](https://meta.discourse.org/u/Sujan)
#### Post date: [10월 24, 2017, 9:04오전 UTC](https://meta.discourse.org/t/akismet-plugin-always-returns-sorry-an-error-has-occured-although-everything-works-as-expected/72672/1 "2017-10-24T09:04:20Z")

</div>

Oh there is an Akismet report about a spam post:

 ![1](https://global.discourse-cdn.com/meta/original/3X/1/c/1c044fc6d66132e7aa77203424539086c1d9cd5c.PNG)

Nope, not spam. I click “Not Spam”. But I get “Sorry, an error has occured.”:

 ![2](https://global.discourse-cdn.com/meta/original/3X/7/d/7db5c242e174781925acf4ecf0414de1854e1439.PNG)

But the report is gone:

 ![3](https://global.discourse-cdn.com/meta/original/3X/3/7/379a335bc83d1ff80ce514f7ed805fe5d732361c.PNG)

And the log shows that the post was correctly “confirmed not spam”:

 ![4](https://global.discourse-cdn.com/meta/original/3X/4/4/445a62131adef41287fbdd1c3c0683b5bc55481c.PNG)

Anyone else having this problem?

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [10월 24, 2017, 9:33오전 UTC](https://meta.discourse.org/t/akismet-plugin-always-returns-sorry-an-error-has-occured-although-everything-works-as-expected/72672/2 "2017-10-24T09:33:52Z")

</div>

This might happen when you click the button but the post was already handled by someone else.

Not sure how hard it is to properly handle this case though.

---

<div class="post-metadata">

### Author: ![Sujan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sujan/32/70979_2.png) [@Sujan](https://meta.discourse.org/u/Sujan)
#### Post date: [10월 24, 2017, 9:52오전 UTC](https://meta.discourse.org/t/akismet-plugin-always-returns-sorry-an-error-has-occured-although-everything-works-as-expected/72672/3 "2017-10-24T09:52:28Z")

</div>

It was not, see my last screenshot. I am “Sujan12” that is logged as having handled it. That’s what makes this a bug 😕

---

<div class="post-metadata">

### Author: ![Sujan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sujan/32/70979_2.png) [@Sujan](https://meta.discourse.org/u/Sujan)
#### Post date: [10월 24, 2017, 3:28오후 UTC](https://meta.discourse.org/t/akismet-plugin-always-returns-sorry-an-error-has-occured-although-everything-works-as-expected/72672/4 "2017-10-24T15:28:13Z")

</div>

Some more investigating into this:

 ![image](https://global.discourse-cdn.com/meta/original/3X/a/9/a90c22a71d93ae4e150c03bc074c96d328eb572f.png)  
Chrome Dev Tools Network panel screenshot for another session. I go to `/admin/plugins/akismet` in the first request. Later you see `allow` which is `/admin/plugins/akismet/allow` that already responds with an error 500:

 ![image](https://global.discourse-cdn.com/meta/original/3X/c/7/c720fc2a91e5b950d25904dde6df876938152c5c.png)

Again I checked the logs, it has my account as “confirmed not spam” for that post.

---

<div class="post-metadata">

### Author: ![LeoMcA](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/leomca/32/87233_2.png) [@LeoMcA](https://meta.discourse.org/u/LeoMcA)
#### Post date: [10월 25, 2017, 1:45오후 UTC](https://meta.discourse.org/t/akismet-plugin-always-returns-sorry-an-error-has-occured-although-everything-works-as-expected/72672/6 "2017-10-25T13:45:27Z")

</div>

> [@Sujan](#):
>
> Anyone else having this problem?

I’ve had this happen to me a couple of times as well. The first time I assumed it was a race condition, the next time I wasn’t so sure…

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [10월 26, 2017, 7:09오후 UTC](https://meta.discourse.org/t/akismet-plugin-always-returns-sorry-an-error-has-occured-although-everything-works-as-expected/72672/10 "2017-10-26T19:09:11Z")

</div>

This is another Rails 5 regression. Fixed here:

[https://github.com/discourse/discourse-akismet/commit/137c30ec467bbdd98da29bd2b289acf50a639604](https://github.com/discourse/discourse-akismet/commit/137c30ec467bbdd98da29bd2b289acf50a639604)

---

<div class="post-metadata">

### Author: ![tobiaseigen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tobiaseigen/32/539204_2.png) [@tobiaseigen](https://meta.discourse.org/u/tobiaseigen)
#### Post date: [10월 26, 2017, 8:03오후 UTC](https://meta.discourse.org/t/akismet-plugin-always-returns-sorry-an-error-has-occured-although-everything-works-as-expected/72672/11 "2017-10-26T20:03:23Z")

</div>

Great! For the record I saw this a few times in the last 10 days as well. Glad it’s fixed.

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [10월 27, 2017, 10:00오후 UTC](https://meta.discourse.org/t/akismet-plugin-always-returns-sorry-an-error-has-occured-although-everything-works-as-expected/72672/12 "2017-10-27T22:00:11Z")

</div>

This topic was automatically closed after 26 hours. New replies are no longer allowed.
