decred / politeia

ISC License
110 stars 75 forks source link

politeiad: Invalid token bug. #1611

Closed lukebp closed 2 years ago

lukebp commented 2 years ago

I found these errors in the production logs. Invalid token errors are causing 500s instead of returning user errors on the /pluginreads route. This is incorrect and should be fixed so that a user error is returned.

2021-12-08 18:04:25.942 [ERR] POLI: 127.0.0.1:44865 POST /v2/pluginreads HTTP/1.1 Internal error 1638986665: PluginRead ticketvote summary : summary: summaryCache: invalid token ^[0-9a-f]{7,16}
2021-12-08 18:04:53.505 [ERR] POLI: 127.0.0.1:15217 POST /v2/pluginreads HTTP/1.1 Internal error 1638986693: PluginRead pi summary : token not provided
amass01 commented 2 years ago

Trying to reproduce the errors with no luck. Tried pictl votesummaries & pictl proposalsummaries with various invalid inputs and no 500 was thrown.

lukebp commented 2 years ago

I'm not seeing this in the production logs anymore. This originally occured during a proposal vote. Perphaps that's one of the root causes. @amass01, can you try reproducing this while there are proposals being voted on?

amass01 commented 2 years ago

yep, sure. will give it a try.

amass01 commented 2 years ago

I'm not seeing this in the production logs anymore. This originally occured during a proposal vote. Perphaps that's one of the root causes. @amass01, can you try reproducing this while there are proposals being voted on?

Still couldn't reproduce with couple of proposals being voted on. I'm closing this issue for now, we can re-open it in case in case the issue show up in the future.