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 <noreply@anthropic.com>
This commit is contained in:
test
2026-03-07 14:51:50 +08:00
parent 42bd6dcb8a
commit c7c192a703

View File

@@ -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',