Skip to content

EspoCRM – Open Source CRM Application

Fix login no error

Yurii1c2a2a6bd434
diff --git a/client/src/views/login.js b/client/src/views/login.js
index 83e1c34b38..b40546edb3 100644
--- a/client/src/views/login.js
+++ b/client/src/views/login.js
@@ -292,11 +292,11 @@ class LoginView extends View {
this.enableForm();
if (xhr.status === 401) {
- const data = JSON.parse(xhr.responseText);
-
const statusReason = xhr.getResponseHeader('X-Status-Reason');
if (statusReason === 'second-step-required') {
+ const data = JSON.parse(xhr.responseText);
+
xhr.errorIsHandled = true;
this.onSecondStepRequired(initialHeaders, userName, password, data);