From 7543054df3572f8c869ebf4bac477bcd35d7880e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B6=8C=ED=98=81=EC=84=B1?= Date: Wed, 25 Feb 2026 21:14:48 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=84=B8=EC=85=98=20=EB=A7=8C=EB=A3=8C?= =?UTF-8?q?=20=EC=98=88=EC=99=B8=EB=A5=BC=20=EC=8A=AC=EB=9E=99=20=EC=95=8C?= =?UTF-8?q?=EB=A6=BC=EC=97=90=EC=84=9C=20=EC=A0=9C=EC=99=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - '회원정보 정보 없음' AuthenticationException은 API Key 검증 통과 후 발생하므로 세션 만료 정상 케이스 - IP 기반 필터링(EXCEPTION_IGNORED_IPS) 대신 예외 자체를 무조건 제외하도록 단순화 Co-Authored-By: Claude Opus 4.6 --- app/Exceptions/Handler.php | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 83bdeef..03e127a 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -17,25 +17,13 @@ class Handler extends ExceptionHandler { /** - * 특정 IP에서 발생하는 예외를 슬랙/로그에서 무시할지 확인 + * 슬랙 알림에서 무시할 예외인지 확인 */ protected function shouldIgnoreException(Throwable $e): bool { - $ignoredIps = array_filter( - array_map('trim', explode(',', env('EXCEPTION_IGNORED_IPS', ''))) - ); - - if (empty($ignoredIps)) { - return false; - } - - $currentIp = request()?->ip(); - - // 무시할 IP 목록에 있고, '회원정보 정보 없음' 예외인 경우 - if (in_array($currentIp, $ignoredIps, true)) { - if ($e instanceof AuthenticationException && $e->getMessage() === '회원정보 정보 없음') { - return true; - } + // 세션 만료로 인한 인증 실패는 슬랙 알림 제외 (API Key 검증 통과 후 발생하므로 정상 케이스) + if ($e instanceof AuthenticationException && $e->getMessage() === '회원정보 정보 없음') { + return true; } return false;