IntersectMBO / IntersectMBO/govtool

🐛 Error Handling Improvement Needed for Constitution Proposal Submission

Open
#2,986 0 comments 0 reactions 1 assignee Claimed by @nebojsact View on GitHub
🎨 Design Needed 🐛 Bug 📜 Proposal Pillar 🕵️‍♂️ Testing
Dominant language
HTML
Stars
21
Forks
29
Avg merge
2d 22h
Merged PRs (30d)
7

Description

### Area

Proposal Pillar

### Domain

preview.gov.tools

### Which wallet were you using?

_No response_

### Context

While attempting to submit an "Update the Constitution" type proposal, the submission failed due to an invalid URL and hash for the guardrails. Additionally, a CORS issue occurred for the new constitution URL. Currently, the error messages are only displayed in the console log, making it difficult for users to identify the issue.

To improve the user experience:

- Error messages should be displayed in a dialog box instead of just the console log.
- Guardrails URL and hash should be pre-validated during proposal creation to ensure they match, preventing errors during submission.
- Add validation for new constitution URL character limit

### Steps to reproduce

1. Connect with a wallet.
2. Create a constitution-type proposal using a valid new constitution URL, e.g., https://metadata-govtool.cardanoapi.io/data/constitution.
3. Attempt to submit the proposal as a governance action.

### Actual behaviour

- Guardrails URL and hash validation are insufficient.
- New constitution URL limit validation error
- Error messages are only shown in the console log.

![Image](https://github.com/user-attachments/assets/ac387b02-a5d1-4817-8864-ceac80458ed4)

![Image](https://github.com/user-attachments/assets/83d49e2f-197c-4b8b-8910-4e4299c19cc7)

### Expected behaviour

- Guardrails URL and hash should be validated during proposal creation.
- Error messages should be displayed in a dialog box for better user visibility.
- Reject the new constitution URL if it exceeds 128 characters during proposal creation.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.