We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3c5bdad commit 145048cCopy full SHA for 145048c
src/core/BaseProxy.ts
@@ -211,17 +211,13 @@ class BaseProxy {
211
this.errors.processing = false
212
validator.processing = false
213
const { response } = error
214
- if (response) {
215
- const { data, status } = response
216
- if (status === UNPROCESSABLE_ENTITY) {
217
- const errors = {}
218
- Object.assign(errors, data[this.$errorProperty])
219
- this.onFail(errors)
220
- }
221
- reject(error)
222
- } else {
223
+ if (response && response.status === UNPROCESSABLE_ENTITY) {
+ const { data } = response
+ const errors: Record<string, any> = {}
+ Object.assign(errors, data[this.$errorProperty])
+ this.onFail(errors)
224
}
+ reject(error)
225
})
226
227
0 commit comments