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

🐛 Creating a proposal is failing with status code 400 #1830

Closed
spannercode opened this issue Aug 26, 2024 · 6 comments
Closed

🐛 Creating a proposal is failing with status code 400 #1830

spannercode opened this issue Aug 26, 2024 · 6 comments
Assignees
Labels
🐛 Bug Something isn't working 📜 Proposal Pillar

Comments

@spannercode
Copy link
Contributor

Area

Proposal Pillar

Domain

sanchogov.tools

Which wallet were you using?

Eternal Beta

Context

Creating a proposal after verifying the identity and filling in the details fails with no visible error shown.

Here is the screenshot of the console at the moment:
Screenshot 2024-08-26 at 20 17 04

Looking deeper into the network calls, the POST request to /api/proposals is failing with status code 400

curl 'https://z74f91f2d-zb0719f09-gtw.z937eb260.rustrocks.fr/api/proposals' \
  -H 'accept: application/json, text/plain, */*' \
  -H 'accept-language: en-GB,en-US;q=0.9,en;q=0.8' \
  -H 'authorization: Bearer {REMOVED}' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -H 'origin: https://sanchogov.tools' \
  -H 'pragma: no-cache' \
  -H 'priority: u=1, i' \
  -H 'referer: https://sanchogov.tools/' \
  -H 'sec-ch-ua: "Chromium";v="128", "Not;A=Brand";v="24", "Google Chrome";v="128"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "macOS"' \
  -H 'sec-fetch-dest: empty' \
  -H 'sec-fetch-mode: cors' \
  -H 'sec-fetch-site: cross-site' \
  -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36' \
  --data-raw '{"data":{"proposal_links":[],"gov_action_type_id":1,"prop_receiving_address":null,"prop_amount":null,"prop_name":"Climate Consciousness in Blockchain: Why Cardano Leads the Way","prop_abstract":"Climate change is one of the most pressing challenges of our time, and its impacts are becoming increasingly apparent across the globe. As technology continues to advance, the need for sustainable practices in all sectors is more urgent than ever.","prop_motivation":"The motivation behind addressing climate change in the context of blockchain technology stems from the recognition that the digital world is not isolated from the physical environment.","prop_rationale":"The rationale for prioritizing climate consciousness when running a blockchain node is rooted in the broader context of environmental responsibility.","is_draft":false}}'

Response:

{
  "data": null,
  "error": {
      "status": 400,
      "name": "BadRequestError",
      "message": "Bad Request",
      "details": "Proposal content not created"
  }
}

Steps to reproduce

  • Connect Eternal wallet
  • Verify Identity
  • Start creating a proposal (Info)
  • Fill all the required fields
  • On the 'Review Your Submission' screen click submit -> Nothing happens and no visible error is shown.
  • Check console/network logs for the errors.

Actual behavior

No user feedback is provided to the user. The user is stuck on the 'Review Your Submission' page.
On the console, the errors are logged. Screenshot attached on context section above.

Expected behavior

Proposal should be successfully created.

@Ryun1
Copy link
Member

Ryun1 commented Aug 26, 2024

This is very strange!
it worked for me, see proposal

@spannercode
Copy link
Contributor Author

The issue seems to be with the title length.

The title used for the failing test:

Climate Consciousness in Blockchain: Why Cardano Leads the Way

@Ryun1
Copy link
Member

Ryun1 commented Aug 26, 2024

Climate Consciousness in Blockchain: Why Cardano Leads the Way

I can confirm, using this title break submission of proposal

@IntersectMBO IntersectMBO deleted a comment from masooddahmedd Aug 26, 2024
@IntersectMBO IntersectMBO deleted a comment Aug 27, 2024
@IntersectMBO IntersectMBO deleted a comment Aug 27, 2024
@bosko-m bosko-m moved this to To do in Govtool all Aug 27, 2024
@vpaunovic
Copy link

vpaunovic commented Aug 27, 2024

@bosko-m @spannercode @Ryun1 This can be tested. It was that, we sync now validation on FE and BE in the terms of maximum number of character

@bosko-m bosko-m moved this from To do to In staging in Govtool all Aug 27, 2024
@bosko-m
Copy link
Contributor

bosko-m commented Aug 28, 2024

@vpaunovic Im testing this on Preview and still getting 400 with the following string used: "Climate Consciousness in Blockchain: Why Cardano Leads the Way #2"
CC @MSzalowski

@bosko-m
Copy link
Contributor

bosko-m commented Aug 28, 2024

Verified on Preview.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working 📜 Proposal Pillar
Projects
Status: Done
Development

No branches or pull requests

7 participants
@Ryun1 @spannercode @bosko-m @vpaunovic and others