-
Notifications
You must be signed in to change notification settings - Fork 74
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
Error messages aren't displaying on the remote container create form #2601
Error messages aren't displaying on the remote container create form #2601
Conversation
This is missing a PR description now, what is this supposed to do? :) |
src/containers/execution-environment-list/execution_environment_list.tsx
Outdated
Show resolved
Hide resolved
9fe2a79
to
f335449
Compare
src/containers/execution-environment-list/execution_environment_list.tsx
Show resolved
Hide resolved
One more thing noticed during testing... this doesn't deal with unknown errors from the server in any way, no alerts, no messages, just a stuck form. Try adding a EE with a name like (The response looks like... {
"errors": [
{
"status": "400",
"code": "invalid",
"title": "Invalid input.",
"detail": "The provided base path contains forbidden characters.",
"source": {
"parameter": "base_path"
}
}
]
} ) |
TODO - delete validation errors when alert is shown and error does not belong to any field. |
7b2e0d3
to
980313f
Compare
6d9789e
to
ec734ef
Compare
src/containers/execution-environment-list/execution_environment_list.tsx
Outdated
Show resolved
Hide resolved
src/containers/execution-environment-list/execution_environment_list.tsx
Outdated
Show resolved
Hide resolved
4c51ee4
to
5521afd
Compare
4a36a77
to
3cf6437
Compare
Issue: 1845 Repair setState passing to function without lambda PR checks Issue: AAH-1845 Delete unecessary set functions in validation utility PR review Review - registry to registries Use of form valid Handle errors for registries and registry. Log the rest of the errors. Catch promises on save in one place. Alert the rest errors instead of displaying them. Translate error string, show error only for unknown field, clear the error after showing alert Add translation Rename rest remoteId PR review Prettier WIP Prettier Remove messages without field Prettier PR Checks Review - rename remotePulpId and add type to isFieldValid function Prettier Change order of prop WIP WIP
3cf6437
to
c3b3e00
Compare
Looks like this works 👍 (just needs a rebase to get tests green, #3018 ) |
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.
👍 (once tests go green)
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
…nsible#2601) * WIP * Repair forms validation in EE form. Issue: 1845 Repair setState passing to function without lambda PR checks Issue: AAH-1845 Delete unecessary set functions in validation utility PR review Review - registry to registries Use of form valid Handle errors for registries and registry. Log the rest of the errors. Catch promises on save in one place. Alert the rest errors instead of displaying them. Translate error string, show error only for unknown field, clear the error after showing alert Add translation Rename rest remoteId PR review Prettier WIP Prettier Remove messages without field Prettier PR Checks Review - rename remotePulpId and add type to isFieldValid function Prettier Change order of prop WIP WIP (cherry picked from commit 77ecd51) (manual resolution of remoteId vs remotePulpId)
…nsible#2601) Issue: AAH-1845 (cherry picked from commit 77ecd51) (manual resolution of remoteId vs remotePulpId)
…nsible#2601) Issue: AAH-1845 (cherry picked from commit 77ecd51) (manual resolution of group field differences)
https://issues.redhat.com/browse/AAH-1845
This PR refactors error handling using utils. Every error (including field validation and server side validation together) is now in one associative array formErrors, which can hold error message per form field (for example formErrors['name']).
Also, validation from server in attempt to save the form is now included.