Skip to content

🐛 Error 500 When Accessing Governance Action Details Due to Ambiguous Identifier Matching #3911

@bosko-m

Description

@bosko-m

Area

Voting Pillar

Domain

gov.tools

Which wallet were you using?

No response

Context

Several Governance Actions fail to load on the GovTool interface, returning a 500 Internal Server Error. The issue arises when attempting to access specific proposals that share the same txHash and have a single-digit index (e.g., #1, #2, #3).

Affected Governance Actions:

Backend error message:
Multiple proposals found for id: 8ad3d454f3496a35cb0d07b0fd32f687f66338b7d60e787fc0a22939e5d8833e#1. This should never happen

Steps to reproduce

  1. Attempt to open one of the affected Governance Action detail pages.
  2. Observe that the page fails to load.
  3. There is an error HTTP 500 error and backend logs indicate multiple matches for the given ID.

Actual behavior

  • Page fails to load due to backend query returning multiple proposals for what should be a unique proposal_id.

Root Cause

  • A SQL LIKE query is used to retrieve proposals based on proposal_id, e.g., LIKE '%#1'.
  • This inadvertently matches other proposals such as #11, #12, etc.
  • The same issue affects #2 (matching #21, #22, etc.) and #3 (matching #31, #32, etc.).
  • This leads to multiple results where only one is expected, triggering the failure.

Likely source of the issue:
list-proposals.sql

Expected behavior

Each Governance Action detail page should load reliably when accessed via a valid and unique proposal ID.

Backend query should return exactly one result per request.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions