We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b746619 commit 9e0b618Copy full SHA for 9e0b618
Resources/public/js/form/creation/modal.js
@@ -66,9 +66,15 @@ define(
66
type: 'POST',
67
data: JSON.stringify(data)
68
}).fail(function (response) {
69
- const errors = response.responseJSON ?
+ if (response.responseJSON) {
70
+ this.getRoot().trigger(
71
+ 'pim_enrich:form:entity:bad_request',
72
+ {'sentData': this.getFormData(), 'response': response.responseJSON.values}
73
+ );
74
+ }
75
+
76
+ this.validationErrors = response.responseJSON ?
77
this.normalize(response.responseJSON) : [{message: __('error.common')}];
- this.validationErrors = errors;
78
this.render();
79
}.bind(this))
80
.always(() => loadingMask.remove());
0 commit comments