handleSubmit = async (values, { setErrors, resetForm }) => { try { // attempt API call } catch(e) { setErrors(transformMyApiErrors(e)) // or setStatus(transformMyApiErrors(e)) } }