fix: use correct client log method name in login error handler
TaxBaik CI/CD / build-and-deploy (push) Successful in 2m42s

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 <noreply@anthropic.com>
This commit is contained in:
2026-07-03 13:19:53 +09:00
parent 015ace6671
commit 6fb17df2c2
+14 -12
View File
@@ -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 = '로그인 중 오류가 발생했습니다.';