feat(desktop): enhance error handling and logging for session synchronization and window mode transitions
This commit is contained in:
@@ -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,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user