fix: catch error bill.

This commit is contained in:
elforjani3
2021-05-09 00:50:19 +02:00
parent 649acc7058
commit b5b60d6f28

View File

@@ -114,7 +114,11 @@ function BillForm({
} }
}; };
// Handle the request error. // Handle the request error.
const onError = (errors) => { const onError = ({
response: {
data: { errors },
},
}) => {
handleErrors(errors, { setErrors }); handleErrors(errors, { setErrors });
setSubmitting(false); setSubmitting(false);
}; };