feat(desktop): enhance error handling and logging for session synchronization and window mode transitions
Desktop Client Build / Resolve Build Metadata (push) Successful in 24s
Desktop Client Build / Build Desktop Client (push) Successful in 22m50s
Desktop Client Build / Publish Client Artifacts to NAS (push) Successful in 27s

This commit is contained in:
2026-06-04 16:39:30 +08:00
parent ae455ea21c
commit b40434018a
6 changed files with 85 additions and 22 deletions
@@ -62,6 +62,7 @@ const SOHU_ORIGIN = 'https://mp.sohu.com'
const SOHU_MANAGE_URL = `${SOHU_ORIGIN}/mpfe/v4/contentManagement/first/page?newsType=1`
const SOHU_PUBLISH_URL = `${SOHU_ORIGIN}/mpbp/bp/news/v4/news/publish/v2`
const SOHU_DRAFT_URL = `${SOHU_ORIGIN}/mpbp/bp/news/v4/news/draft/v2`
const SOHU_NOT_LOGGED_IN_MESSAGE = '搜狐号账号登录态已失效,请重新登录搜狐号后再重试。'
function stringId(value: unknown): string {
if (typeof value === 'number') {
@@ -296,7 +297,7 @@ function failureResult(
summary: '搜狐号登录态失效,无法执行发布。',
error: {
code: 'sohuhao_not_logged_in',
message,
message: SOHU_NOT_LOGGED_IN_MESSAGE,
},
}
}