IntersectMBO / IntersectMBO/govtool
TypeError: Cannot read properties of undefined (reading 'yes_votes')
- Dominant language
- HTML
- Stars
- 21
- Forks
- 29
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 7
Description
Sentry Issue: [GOVTOOL-FRONTEND-JS](https://intersect.sentry.io/issues/6488123461/?referrer=github_integration)
```
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](https://preview.gov.tools/outcomes/governance_actions/8d658da00803e3bddb49a0b85be24705bdea4317526b56ab651e5881b1cfc45f#0).
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](https://gov.tools/outcomes/governance_actions/56f39054758f1a3cedc1de9225d66bf270b62dfdbfbc5399f1d6d43aceffc63) (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')`.

### 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."**

Contributor guide
Assessment
This issue has not been assessed yet.