mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-27 00:55:01 +00:00
vuejs: better violations message in 422 error handling
This commit is contained in:
@@ -275,8 +275,8 @@ export default {
|
||||
.catch((error) => {
|
||||
//commit('catchError', error);
|
||||
if (error.name === 'ValidationException') {
|
||||
for (let e of error.propertyPaths) {
|
||||
this.$toast.open({message: `${e}` }); //TODO better exploit violations messages
|
||||
for (let v of error.violations) {
|
||||
this.$toast.open({message: v });
|
||||
}
|
||||
} else {
|
||||
this.$toast.open({message: 'An error occurred'});
|
||||
|
Reference in New Issue
Block a user