Do not show error box if an validation error occurs.

This commit is contained in:
Jan Böhmer 2022-07-24 21:28:18 +02:00
parent 103969a283
commit 6885aefbe7

View file

@ -21,6 +21,11 @@ const ErrorHandlerHelper = class {
return; return;
} }
//Ignore status 422 as this means a symfony validation error occured and we need to show it to user. This is no (unexpected) error.
if (response.status = 422) {
return;
}
if(fetchResponse.failed) { if(fetchResponse.failed) {
//Create error text //Create error text
let title = response.statusText + ' (Status ' + response.status + ')'; let title = response.statusText + ' (Status ' + response.status + ')';