Skip to content

TypeError: Cannot read properties of undefined (reading 'yes_votes') #3306

@sentry

Description

@sentry

Sentry Issue: GOVTOOL-FRONTEND-JS

TypeError: Cannot read properties of undefined (reading 'yes_votes')
  at Tu (/assets/index-DunOmkto.js:1:392800)
  at ho (/assets/index-vh7wGAbc.js:20:60115)
  at yc (/assets/index-vh7wGAbc.js:20:118968)
  at gl (/assets/index-vh7wGAbc.js:20:108220)
  at hl (/assets/index-vh7wGAbc.js:20:108148)
...
(5 additional frame(s) were not displayed)

Context

When a valid governance action ID is provided, the outcomes details page successfully loads:
👉 Example Valid URL.

However, if an invalid or non-existent governance action ID is used, the page displays a blank screen and logs the error:
TypeError: Cannot read properties of undefined (reading 'yes_votes')

Steps to Reproduce

  1. Navigate to: Invalid Governance Action ID (or any invalid governance action ID).

Actual Behavior

  • The page renders as a blank screen.
  • The console logs the error: Cannot read properties of undefined (reading 'yes_votes').

Image

Expected Behavior

  • If the governance action ID is invalid or not found, the application should handle the response gracefully.
  • Instead of a blank screen, display a message such as "Governance action ID not found."

Image

Metadata

Metadata

Assignees

Type

Projects

Status

No status

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions