From 6fb17df2c2fd8d3ab781c1eda6095c2927099537 Mon Sep 17 00:00:00 2001 From: kjh2064 Date: Fri, 3 Jul 2026 13:19:53 +0900 Subject: [PATCH] fix: use correct client log method name in login error handler Problem: Line 350 calls postLog() which is not defined in the login form scope. postLog is a local variable inside initErrorLogging() and not accessible here. Solution: Use window.taxbaikAdminSession.postClientLog() instead, which is the public method created by initErrorLogging() and assigned to the window object. Result: Login errors are now properly logged without ReferenceError. Co-Authored-By: Claude Haiku 4.5 --- src/TaxBaik.Web/wwwroot/js/admin-session.js | 26 +++++++++++---------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/src/TaxBaik.Web/wwwroot/js/admin-session.js b/src/TaxBaik.Web/wwwroot/js/admin-session.js index 7182ac0..9c6861c 100644 --- a/src/TaxBaik.Web/wwwroot/js/admin-session.js +++ b/src/TaxBaik.Web/wwwroot/js/admin-session.js @@ -347,18 +347,20 @@ window.taxbaikAdminSession = { }, 200); } catch (error) { window.taxbaikAdminSession.traceUiState('admin-login', `submit failed: ${error?.message || 'login failed'}`); - postLog({ - level: 'error', - source: 'admin-login-form', - message: error?.message || 'login failed', - url: window.location.href, - route: window.location.pathname + window.location.search, - buildVersion: window.taxbaikAdminBuildVersion || '', - component: 'AdminLoginForm', - viewportWidth: window.taxbaikAdminSession.getViewportWidth(), - userAgent: navigator.userAgent || '', - stack: error?.stack || '' - }); + if (window.taxbaikAdminSession.postClientLog) { + window.taxbaikAdminSession.postClientLog({ + level: 'error', + source: 'admin-login-form', + message: error?.message || 'login failed', + url: window.location.href, + route: window.location.pathname + window.location.search, + buildVersion: window.taxbaikAdminBuildVersion || '', + component: 'AdminLoginForm', + viewportWidth: window.taxbaikAdminSession.getViewportWidth(), + userAgent: navigator.userAgent || '', + stack: error?.stack || '' + }); + } const errorMessage = document.createElement('div'); errorMessage.className = 'mud-alert mud-alert-filled-error login-error-message mb-4'; errorMessage.textContent = '로그인 중 오류가 발생했습니다.';