Closed esot321c closed 10 months ago
API Error response:
"\"(psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint \\"dao_id_name_on_chain_id\\"\nDETAIL: Key (dao_id, on_chain_id, name)=(da651be0-2d1c-4d55-b51c-efd6b30cb1d9, 4, Hello) already exists.\n\n[SQL: INSERT INTO proposals (id, dao_id, on_chain_id, user_details_id, name, image_url, category, content, voting_system, actions, tags, attachments, status, is_proposal, box_height, votes) VALUES (%(id)s, %(dao_id)s, %(on_chain_id)s, %(user_details_id)s, %(name)s, %(image_url)s, %(category)s, %(content)s, %(voting_system)s, %(actions)s, %(tags)s, %(attachments)s, %(status)s, %(is_proposal)s, %(box_height)s, %(votes)s)]\n[parameters: {'id': UUID('afa683bd-b6d3-4ec6-a921-cd50f053baf1'), 'dao_id': UUID('da651be0-2d1c-4d55-b51c-efd6b30cb1d9'), 'on_chain_id': 4, 'user_details_id': UUID('2676df16-9c14-4879-970e-0162e53664e1'), 'name': 'Hello', 'image_url': 'https://ergopad-public.s3.us-west-2.amazonaws.com/assets.test.169542088064068.jpg', 'category': 'General', 'content': 'test', 'voting_system': 'yes/no', 'actions': '{\\"actions_list\\": [{\\"actionType\\": \\"SendFundsBasic\\", \\"action\\": {\\"activationTime\\": 1695593624312, \\"optionId\\": 1, \\"outputs\\": [{\\"address\\": \\"9ebmurBJQWeWQg ... (21 characters truncated) ... r7P2tvnJ4afAy67x\\", \\"nergs\\": 1000000, \\"tokens\\": [[\\"0040ae650c4ed77bcd20391493abe84c1a9bb58ee88e87f15670c801e2fc5983\\", 1000000]], \\"registers\\": []}]}}]}', 'tags': '{\\"tags_list\\": null}', 'attachments': '{\\"attachments_list\\": []}', 'status': 'Draft', 'is_proposal': True, 'box_height': 0, 'votes': '{\\"votes\\": [0, 0]}'}]\n(Background on this error at: https://sqlalche.me/e/14/gkpj)\""
Is this one related to the database creating the proposal, then the proposal didn't successfully get created?
Need to handle proposals with the same name: provide form validation at the time to creation
Lui to improve API error
Marty to add form validation
Need to make a list of the areas where this error shows up so we can resolve case-by-case.
Bounty of 1000 Paideia to make a list of all the places on the site that throw this error
How to recreate: