From ccc512cdddfd13ae27ecb4a407b5fe6ee6c42015 Mon Sep 17 00:00:00 2001 From: Riley Davis Date: Wed, 26 Apr 2017 11:43:34 -0600 Subject: [PATCH] if there is no available translation, do not show error.whatever in the UI --- client/coral-framework/actions/auth.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/client/coral-framework/actions/auth.js b/client/coral-framework/actions/auth.js index e112b2b6c..b3f374754 100644 --- a/client/coral-framework/actions/auth.js +++ b/client/coral-framework/actions/auth.js @@ -177,7 +177,13 @@ export const fetchSignUp = (formData, redirectUri) => (dispatch) => { dispatch(signUpSuccess(user)); }) .catch(error => { - dispatch(signUpFailure(lang.t(`error.${error.message}`))); + let errorMessage = lang.t(`error.${error.message}`); + + // if there is no translation defined, just show the error string + if (errorMessage === `error.${error.message}`) { + errorMessage = error.message; + } + dispatch(signUpFailure(errorMessage)); }); };