# Poll results page produces error messages

**URL:** https://meta.discourse.org/t/poll-results-page-produces-error-messages/56404
**Category:** Bug
**Tags:** polls
**Created:** [26.Январь.2017 16:46:36 UTC](https://meta.discourse.org/t/poll-results-page-produces-error-messages/56404 "2017-01-26T16:46:36Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![ChrisBeach](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chrisbeach/32/214628_2.png) [@ChrisBeach](https://meta.discourse.org/u/ChrisBeach)
#### Post date: [26.Январь.2017 16:46:36 UTC](https://meta.discourse.org/t/poll-results-page-produces-error-messages/56404/1 "2017-01-26T16:46:36Z")

</div>

Version: **v1.8.0.beta2 +90** (very recent)

When browsing to [a poll](https://se23.life/t/what-else-do-forest-hill-and-honor-oak-need/2861) and switching to the results page I got an error message, which re-appeared several times when clicking “ok”

 ![](https://global.discourse-cdn.com/meta/original/3X/e/a/ea03aa5bee458a04d828cea0e7b1bb30441525ef.png)

This error occurs for logged-in and non-logged-in users

I can send the production log snippet to anyone that’s interested. Can’t see anything obviously wrong in it.

The client-side javascript log shows the following:

![](https://global.discourse-cdn.com/meta/optimized/3X/0/f/0fb024c565b9a3f402e078c619e2c62561b1038a_2_690x49.png)

---

<div class="post-metadata">

### Author: ![ChrisBeach](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chrisbeach/32/214628_2.png) [@ChrisBeach](https://meta.discourse.org/u/ChrisBeach)
#### Post date: [26.Январь.2017 16:53:25 UTC](https://meta.discourse.org/t/poll-results-page-produces-error-messages/56404/2 "2017-01-26T16:53:25Z")

</div>

Looks like HTTP 429 indicates a [rate limit](https://httpstatuses.com/429) issue.

My poll has 67 responders, 261 votes.

Think perhaps the standard Discourse rate limits need upping?

---

<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: [26.Январь.2017 18:13:20 UTC](https://meta.discourse.org/t/poll-results-page-produces-error-messages/56404/3 "2017-01-26T18:13:20Z")

</div>

Looks like we’re doing 1 request per option in order to retrieve the voters. This triggers the rate limiter when viewing the results of your poll (cc @tgxworld)

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [27.Январь.2017 09:13:50 UTC](https://meta.discourse.org/t/poll-results-page-produces-error-messages/56404/4 "2017-01-27T09:13:50Z")

</div>

Ah yes… this was something that I was struggling to fix previously.

The migration to widgets made it easier 🙂

I have a fix going but I just need some more time to verify that I didn’t break anything 😉

[https://github.com/discourse/discourse/pull/4676](https://github.com/discourse/discourse/pull/4676)

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [31.Январь.2017 09:32:17 UTC](https://meta.discourse.org/t/poll-results-page-produces-error-messages/56404/5 "2017-01-31T09:32:17Z")

</div>

@ChrisBeach I just merged in

[https://github.com/discourse/discourse/commit/8bd8f07ce019265f4c510b9de8631dfa749b5dc2](https://github.com/discourse/discourse/commit/8bd8f07ce019265f4c510b9de8631dfa749b5dc2)

Can you test it out? Thank you! I added more tests as well so the plugin should be alot more stable.

---

<div class="post-metadata">

### Author: ![ChrisBeach](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chrisbeach/32/214628_2.png) [@ChrisBeach](https://meta.discourse.org/u/ChrisBeach)
#### Post date: [31.Январь.2017 09:40:44 UTC](https://meta.discourse.org/t/poll-results-page-produces-error-messages/56404/6 "2017-01-31T09:40:44Z")

</div>

Hi @tgxworld. Thanks for making this fix. My forum is on the tests-passed branch and I can’t see your fix in the change list linked from ‘admin/upgrade’. Does it need to be merged in?

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [31.Январь.2017 09:41:50 UTC](https://meta.discourse.org/t/poll-results-page-produces-error-messages/56404/7 "2017-01-31T09:41:50Z")

</div>

The build is probably still building.

---

<div class="post-metadata">

### Author: ![ChrisBeach](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chrisbeach/32/214628_2.png) [@ChrisBeach](https://meta.discourse.org/u/ChrisBeach)
#### Post date: [31.Январь.2017 09:55:36 UTC](https://meta.discourse.org/t/poll-results-page-produces-error-messages/56404/8 "2017-01-31T09:55:36Z")

</div>

I have just got the fix and tested it with the large poll I mentioned in my OP. No errors, now, and the performance is also improved.

Thank you very much for fixing this, and importantly - adding automated tests.

It’s the presence of tests that makes me comfortable using the latest beta of Discourse for my live forum.

Great work as always @tgxworld 👍

---

<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: [31.Январь.2017 10:59:20 UTC](https://meta.discourse.org/t/poll-results-page-produces-error-messages/56404/9 "2017-01-31T10:59:20Z")

</div>


