From a65c631fcce6623bc1984b0fc9baf7980b13f4b9 Mon Sep 17 00:00:00 2001 From: German Lena Date: Fri, 23 Dec 2016 11:20:39 -0300 Subject: [PATCH 1/2] added new error code --- src/core/web_api.js | 4 ++-- src/i18n/en.js | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/core/web_api.js b/src/core/web_api.js index 6e4949228..0efe45b5d 100644 --- a/src/core/web_api.js +++ b/src/core/web_api.js @@ -206,8 +206,8 @@ function normalizeError(error) { } const result = { - error: error.details ? error.details.error : (error.statusCode || error.error), - description: error.details ? error.details.error_description : (error.error_description || error.error) + error: error.details ? error.details.error : (error.code || error.statusCode || error.error), + description: error.details ? error.details.error_description : (error.error_description || error.description || error.error) } // result is used for passwordless and error for database. diff --git a/src/i18n/en.js b/src/i18n/en.js index 60155a853..90caf9418 100644 --- a/src/i18n/en.js +++ b/src/i18n/en.js @@ -18,7 +18,8 @@ export default { "lock.mfa_invalid_code": "Wrong code. Please try again.", "password_change_required": "You need to update your password because this is the first time you are logging in, or because your password has expired.", // TODO: verify error code "password_leaked": "This login has been blocked because your password has been leaked in another website. We’ve sent you an email with instructions on how to unblock it.", - "too_many_attempts": "Your account has been blocked after multiple consecutive login attempts." + "too_many_attempts": "Your account has been blocked after multiple consecutive login attempts.", + "session_missing": "Session missing. Close all open login dialogs and try again." }, passwordless: { "bad.email": "The email is invalid", From 65ac1dedb2884b544efcfe4852e3da0e33cdb3b4 Mon Sep 17 00:00:00 2001 From: German Lena Date: Mon, 2 Jan 2017 14:40:34 -0300 Subject: [PATCH 2/2] change the error text + added es translation --- src/i18n/en.js | 2 +- src/i18n/es.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/i18n/en.js b/src/i18n/en.js index 90caf9418..22f0ae882 100644 --- a/src/i18n/en.js +++ b/src/i18n/en.js @@ -19,7 +19,7 @@ export default { "password_change_required": "You need to update your password because this is the first time you are logging in, or because your password has expired.", // TODO: verify error code "password_leaked": "This login has been blocked because your password has been leaked in another website. We’ve sent you an email with instructions on how to unblock it.", "too_many_attempts": "Your account has been blocked after multiple consecutive login attempts.", - "session_missing": "Session missing. Close all open login dialogs and try again." + "session_missing": "Couldn't complete your authentication request. Please try again after closing all open dialogs" }, passwordless: { "bad.email": "The email is invalid", diff --git a/src/i18n/es.js b/src/i18n/es.js index 2059ff01b..c508ec15a 100644 --- a/src/i18n/es.js +++ b/src/i18n/es.js @@ -19,6 +19,7 @@ export default { "too_many_attempts": "Su cuenta ha sido bloqueada luego de múltiples intentos de inicio de sesión consecutivos.", "lock.mfa_registration_required": "Por favor enrole su dispositivo antes de continuar con el segundo factor.", "lock.mfa_invalid_code": "Código incorrecto. Por favor vuelva a intentarlo.", + "session_missing": "No es posible completar el proceso de Autenticación. Por favor, cierre todas las ventanas e intente nuevamente." }, passwordless: { "bad.email": "Correo inválido",