From d7b9492f15ffbca9007b7bb0899b7f2895ac8a40 Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Mon, 1 Feb 2021 19:11:13 +0200 Subject: [PATCH] login exception fix --- application/Espo/Core/Api/Auth.php | 2 ++ application/Espo/Core/Api/ErrorOutput.php | 11 ++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/application/Espo/Core/Api/Auth.php b/application/Espo/Core/Api/Auth.php index 7784cb3415..c58e372186 100644 --- a/application/Espo/Core/Api/Auth.php +++ b/application/Espo/Core/Api/Auth.php @@ -185,6 +185,8 @@ class Auth } catch (Exception $e) { $this->processException($response, $e); + + return; } if ($authResult && ($authResult->isSuccess() || $authResult->isSecondStepRequired())) { diff --git a/application/Espo/Core/Api/ErrorOutput.php b/application/Espo/Core/Api/ErrorOutput.php index 24f9c9e9fa..8f4b193730 100644 --- a/application/Espo/Core/Api/ErrorOutput.php +++ b/application/Espo/Core/Api/ErrorOutput.php @@ -50,10 +50,19 @@ class ErrorOutput 404 => 'Page Not Found', 409 => 'Conflict', 500 => 'Internal Server Error', + 503 => 'Service Unavailable', ]; protected $allowedStatusCodeList = [ - 200, 201, 400, 401, 403, 404, 409, 500, + 200, + 201, + 400, + 401, + 403, + 404, + 409, + 500, + 503, ]; protected $ignorePrintXStatusReasonExceptionClassNameList = [