Closed markiscommon closed 13 hours ago
Here is rollbar data: https://app.rollbar.com/a/commonwealth/fix/item/Commonwealth/9666
[21:57:57.913] ERROR (setupErrorHandlers.ts): Could not verify user token balance {"url":"/api/polls/1661/votes","method":"PUT","headers":{"host":"localhost:3000","referer":"http://localhost:8080/vita-fast/discussion/25732-vfdp12-approval-to-test-vitafast-compounds-for-life-extension-in-worms"},"user":{"id":131052},"status":500}
err: {
"type": "ServerError",
"message": "Could not verify user token balance",
"stack":
ServerError: Could not verify user token balance
at ServerPollsController.__updatePollVote (/Users/ilijabojanovic/Documents/work/common/commonwealth/packages/commonwealth/server/controllers/server_polls_methods/update_poll_vote.ts:83:11)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at updatePollVoteHandler (/Users/ilijabojanovic/Documents/work/common/commonwealth/packages/commonwealth/server/routes/polls/update_poll_vote_handler.ts:24:36)
"status": 500,
"error": {
"type": "AppError",
"message": "Insufficient token balance",
"stack":
AppError: Insufficient token balance
at ServerPollsController.__updatePollVote (/Users/ilijabojanovic/Documents/work/common/commonwealth/packages/commonwealth/server/controllers/server_polls_methods/update_poll_vote.ts:80:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at updatePollVoteHandler (/Users/ilijabojanovic/Documents/work/common/commonwealth/packages/commonwealth/server/routes/polls/update_poll_vote_handler.ts:24:36)
"status": 400,
"name": "AppError"
},
"name": "ServerError"
}
Implemented a temporary fix for the vita-fast
community by adding the UPDATE_POLL
permission to the GroupPermissions.allowed_actions
array of group id 360.
Working on a longer-term fix which includes:
Topic Permissions
dropdown which includes UPDATE_POLL
update_poll_vote
to new APIupdate_poll_vote
throw 400 errors not 500
Describe the bug
when trying to vote on a thread poll an error shows up
Initial conditions
Environment: prod Branch/Release version: latest Browser: chrome Wallet: mm
Reproduction steps
try to vote on a poll https://commonwealth.im/vita-fast/discussion/25732-vfdp12-approval-to-test-vitafast-compounds-for-life-extension-in-worms
Actual behavior
unable to vote, error pops up
Expected behavior
should execute the vote
Screenshots / Video
Reporter
VitaDAO
Additional context
P1