-
Notifications
You must be signed in to change notification settings - Fork 15
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
Validation global error #2743
Validation global error #2743
Conversation
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.
Super, thanks!
Just a few paths to adjust, if you want, for the rest LGTM.
I am now realizing that in SUMA credentials modal there is no generic failure handling afaik, so this change could be beneficial there as well.
(I mean, you don't have to do that. Just saying that we now have the opportunity to improve other parts of the app 😉 )
assets/js/common/ActivityLogsSettingsModal/ActivityLogsSettingsModal.test.jsx
Outdated
Show resolved
Hide resolved
@nelsonkopliku super thanks for the suggestion, I actually used the automatic import but it's not that savvy... I'll find out if there are any eslint rules we can enforce, though |
Co-authored-by: Nelson Kopliku <nelson.kopliku@suse.com>
* Return CVEs from `v1/software_updates/errata_details/:advisory_name` * Create CVE factory
Co-authored-by: Nelson Kopliku <nelson.kopliku@suse.com>
This reverts commit ae5ba8f.
* global error * Apply suggestions from code review Co-authored-by: Nelson Kopliku <nelson.kopliku@suse.com> * format * Return CVEs from `Errata Details` endpoint (#2733) * Return CVEs from `v1/software_updates/errata_details/:advisory_name` * Create CVE factory * global error * Apply suggestions from code review Co-authored-by: Nelson Kopliku <nelson.kopliku@suse.com> * format --------- Co-authored-by: Nelson Kopliku <nelson.kopliku@suse.com> Co-authored-by: Jamie Rodríguez <jamie.rodriguez@suse.com>
Description
Add
getGlobalError
utility to map server validation error that not relate to a field. The use case is to render failures coming from the server when fetching/saving data.This PR also applies the error handling as an improvement of #2727.
See unit tests for expected usage.