diff --git a/app/Http/Controllers/Admin/AuthController.php b/app/Http/Controllers/Admin/AuthController.php index 1a2cb5a..c74251f 100644 --- a/app/Http/Controllers/Admin/AuthController.php +++ b/app/Http/Controllers/Admin/AuthController.php @@ -123,9 +123,12 @@ class AuthController extends Controller ], 'token' => $token, ]); - } catch (ValidationException|CustomException $e) { + } catch (ValidationException $e) { RateLimiter::hit($throttleKey, $this->decayMinutes()); throw $e; + } catch (CustomException $e) { + RateLimiter::hit($throttleKey, $this->decayMinutes()); + return $this->responseService->businessError($e->getMessage(), $e->getCode()); } catch (\Exception $e) { RateLimiter::hit($throttleKey, $this->decayMinutes()); $m_prefix = __('admin.login') . __('admin.failed');