-
Notifications
You must be signed in to change notification settings - Fork 363
(Feature) Show error message when a custom Safe App can't be fetched #2498
Conversation
CLA Assistant Lite All Contributors have signed the CLA. |
ESLint Summary View Full Report
Report generated by eslint-plus-action |
const validate = !visited?.appUrl ? undefined : composeValidators(required, validateUrl, uniqueApp(appList)) | ||
const validate = !visited?.appUrl | ||
? undefined | ||
: composeValidators(required, validateUrl, validateManifest, uniqueApp(appList)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uniqueApp
should probably go before validateManifest
.
So that it can check if the URL has been already added before fetching it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works great! ✅
We found an error when: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Tried repeated URL, dummy text (not url), a URL that doesn't have a manifest, a URL that has a invalid manifest. Two of these errors messages are shown in the App name input, not in the URL. According to the snapshot Agustin did the message should be in the URL input, so, is this ok? Are there any more messages? |
Also I tried to reproduce the issue Agustin mentioned, but I wasn't able to. |
@francovenica we had to change the approach. Manifest validation is easier on the step where we try to fetch the Safe App information. The form library used has some limitations at the time of asynchronous validations, and it was easier and more simple to solve it like this. Also this way we can show more specific errors, as on the first approach we could only show that "Error loading the app" but with no more feedback |
Given the explanation Dani gave regarding where some error messages are being shown I can pass the ticket. |
What it solves
Resolves #1865
Co-authored by @juampibermani
How this PR fixes it
By adding a manifest validation
How to test it
In App section:
1- select "Add custom App"
2- Fill in the App URL field with a random url: E.g.: https://gnosis-safe.io/
Screenshots