Prevent Form object to reject error on 422 response

This commit is contained in:
Bubka 2023-10-04 13:58:50 +02:00
parent 82b1e039e6
commit a239b8fc99

View File

@ -195,8 +195,9 @@ class Form {
if (error.response) { if (error.response) {
this.errors.set(this.extractErrors(error.response)) this.errors.set(this.extractErrors(error.response))
} }
if (error.response?.status != 422) {
reject(error) reject(error)
}
}) })
}) })
} }
@ -226,8 +227,9 @@ class Form {
if (error.response) { if (error.response) {
this.errors.set(this.extractErrors(error.response)) this.errors.set(this.extractErrors(error.response))
} }
if (error.response?.status != 422) {
reject(error) reject(error)
}
}) })
}) })
} }