From 7e6e6f8c87cfacf071c7bea0a867fe7ec40a778f Mon Sep 17 00:00:00 2001 From: Bogdan Bodnar Date: Tue, 12 Nov 2019 15:27:40 +0100 Subject: [PATCH] Use generic error message in the ForisForm. --- src/form/components/ForisForm.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/form/components/ForisForm.js b/src/form/components/ForisForm.js index f739f5b..86b552b 100644 --- a/src/form/components/ForisForm.js +++ b/src/form/components/ForisForm.js @@ -87,9 +87,9 @@ export function ForisForm({ postCallback(); setAlert(_("Settings saved successfully"), ALERT_TYPES.SUCCESS); } else if (postState.state === API_STATE.ERROR) { - setAlert(_("Cannot save settings")); + setAlert(postState.data); } - }, [postCallback, postState.state, setAlert]); + }, [postCallback, postState.state, postState.data, setAlert]); if (forisModuleState.state === API_STATE.ERROR) { return ;