Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 "Something went wrong" response from API when fetching the voting power of a newly registered dRep #2407

Closed
sentry-io bot opened this issue Nov 25, 2024 · 0 comments · Fixed by #2434
Assignees
Labels
🐛 Bug Something isn't working

Comments

@sentry-io
Copy link

sentry-io bot commented Nov 25, 2024

Environment: production
Url:https://dev-sanchonet.govtool.byron.network/
Sentry Issue: GOVTOOL-BACKEND-AK

Context

  • When attempting to fetch the voting power of a newly registered dRep via the /drep/get-voting-power endpoint, the API responds with "Something went wrong" instead of returning a value (e.g., 0).

Error Details:

Exception UnexpectedNull {errSQLType = "numeric", errSQLTableOid = Nothing, errSQLField = "amount", errHaskellType = "Scientific", errMessage = ""} while handling request Request {requestMethod = "GET", httpVersion = HTTP/1.1, rawPathInfo = "/drep/get-voting-power/5f3bc5767c5ed2010831d71a6dececfbf084c4e3749d5b2ed3f24f5a", rawQueryString = "", requestHeaders = [("Host","dev-sanchonet.govtool.byron.network"),("User-Agent","Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36"),("Accept","application/json, text/plain, */*"),("Accept-Encoding","gzip, deflate, br, zstd"),("Accept-Language","en-US"),("Origin","http://localhost:5173"),("Priority","u=1, i"),("Referer","http://localhost:5173/"),("Sec-Ch-Ua","\"Chromium\";v=\"129\", \"Not=A?Brand\";v=\"8\""),("Sec-Ch-Ua-Mobile","?0"),("Sec-Ch-Ua-Platform","\"Linux\""),("Sec-Fetch-Dest","empty"),("Sec-Fetch-Mode","cors"),("Sec-Fetch-Site","cross-site"),("X-Forwarded-For","113.199.225.84"),("X-Forwarded-Host","dev-sanchonet.govtool.byron.network"),("X-Forwarded-Port","443"),("X-Forwarded-Prefix","/api"),("X-Forwarded-Proto","https"),("X-Forwarded-Server","1bc69d9655d0"),("X-Real-Ip","113.199.225.84")], isSecure = False, remoteHost = 172.20.0.3:32840, pathInfo = ["drep","get-voting-power","5f3bc5767c5ed2010831d71a6dececfbf084c4e3749d5b2ed3f24f5a"], queryString = [], requestBody = <IO ByteString>, vault = <Vault>, requestBodyLength = KnownLength 0, requestHeaderHost = Just "dev-sanchonet.govtool.byron.network", requestHeaderRange = Nothing}

Steps to Reproduce

  1. Register a new dRep.
  2. Use the /drep/get-voting-power endpoint with the dRep's identifier.
  3. Observe the response.

Expected Behavior

  • The endpoint should return 0 for the voting power of a newly registered dRep if no voting activity exists.

Actual Behavior

  • The API responds with "Something went wrong," indicating an unexpected null value encountered in the SQL query (errSQLField = "amount").
@sentry-io sentry-io bot added the 🐛 Bug Something isn't working label Nov 25, 2024
@bosko-m bosko-m moved this to To do in Govtool all Nov 25, 2024
@bosko-m bosko-m moved this from To do to In progress in Govtool all Nov 27, 2024
@MSzalowski MSzalowski linked a pull request Nov 27, 2024 that will close this issue
5 tasks
@MSzalowski MSzalowski moved this from In progress to In review in Govtool all Nov 27, 2024
MSzalowski added a commit that referenced this issue Nov 29, 2024
…ong-response-from-api-when-fetching-the-voting-power-of-a-newly-registered-drep

fix(#2407): fix fetching voting power for newly registered DRep
@github-project-automation github-project-automation bot moved this from In review to Done in Govtool all Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants