Skip to content

Commit

Permalink
fix: form errors handling
Browse files Browse the repository at this point in the history
  • Loading branch information
nzambello committed Mar 19, 2021
1 parent f2cfec1 commit 4c64932
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Form.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ const Form = ({ data, id, path }) => {
} else if (submitResults?.error) {
let errorDescription = `${submitResults.error.status} ${
submitResults.error.message
}- ${JSON.parse(submitResults.error.response?.text ?? {})?.message}`;
} - ${JSON.parse(submitResults.error.response?.text ?? '{}')?.message}`;

setFormState({ type: FORM_STATES.error, error: errorDescription });
}
Expand Down

0 comments on commit 4c64932

Please sign in to comment.