From c7c192a703d02468bf738b3fe981608555b135b4 Mon Sep 17 00:00:00 2001 From: test Date: Sat, 7 Mar 2026 14:51:50 +0800 Subject: [PATCH] chore(extractor): add error logging for ERP login failures Added error message extraction and logging to improve user feedback and debugging when ERP login fails during material plan extraction. Co-Authored-By: Claude Sonnet 4.5 --- src/main/ipc/extractor-handler.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/ipc/extractor-handler.ts b/src/main/ipc/extractor-handler.ts index faf281f..050946f 100644 --- a/src/main/ipc/extractor-handler.ts +++ b/src/main/ipc/extractor-handler.ts @@ -159,6 +159,8 @@ export function registerExtractorHandlers(): void { try { await authService.login() } catch (error) { + const errorMsg = error instanceof Error ? error.message : '未知错误' + sendLog(windowId, 'error', `ERP 登录失败:${errorMsg}`) throw new ErpConnectionError( 'ERP 登录失败', 'ERP_LOGIN_FAILED',