Skip to content

Conversation

@PedroBinotto
Copy link
Contributor

@PedroBinotto PedroBinotto commented Jan 27, 2026

Changelog

Changed return value when querying an address that has no values associated to it from:

{
    "error": "Internal Server Error",
    "message": "Account not found"
}

to:

{
  "accountId": "0xdadB0d80178819F2319190D340ce9A924f783711",
  "votingPower": "0",
  "votesCount": 0,
  "proposalsCount": 0,
  "delegationsCount": 0
}

The same behaviour is currently applied to the accountBalanceByAccountId and votingPowerVariationsByAccountId queries (meaning the previous, 500 status error); I would like @pikonha's advide for us to settle on a standard for this type of situation.

@vercel
Copy link

vercel bot commented Jan 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
anticapture Ready Ready Preview, Comment Jan 27, 2026 7:50pm
1 Skipped Deployment
Project Deployment Review Updated (UTC)
anticapture-storybook Skipped Skipped Jan 27, 2026 7:50pm

Request Review

@PedroBinotto PedroBinotto marked this pull request as ready for review January 27, 2026 19:51
}

return {
return result ? {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this return null and let the service handle the default value?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it could in fact be a thing added to the API response schema and handled this way

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nvm, I've tried and it didn't look good

@pikonha pikonha merged commit 73e25d7 into dev Jan 28, 2026
4 checks passed
@pikonha pikonha deleted the fix/voting-power-query branch January 28, 2026 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants