Display field errors from the backend in the metadata modal
The metadata modal's form already has the proper template and a this.formErrors
to display errors on each form field. Instead of just showing a generic Request failed with status code 400
, we can handle some of the errors and set this.formErrors
to the error message to allow the template to show more explicit errors. For example, {"value": ["The value of a numeric metadata should be a valid floating-point number."]}
could display the message directly under the field: