feat(publish): handle qiehao real-name auth via shared publisher errors
- Detect qiehao's real-name auth blocking response (code/message) in the desktop adapter, surface a Chinese-friendly summary, and propagate the detail through the failure result. - Extract a shared publisher-errors module so the renderer can normalize these messages for the publish task table without duplicating regex. - Pre-process article HTML for qiehao before upload via a new packages/publisher-platforms/src/qiehao.ts entry point. - Update the manual self-test notes for jianshu and qiehao with the latest results. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -13,6 +13,7 @@ import StatusBadge from "../components/StatusBadge.vue";
|
||||
import { useDesktopRuntime } from "../composables/useDesktopRuntime";
|
||||
import { formatDateTime, formatRelativeTime, titleCaseToken } from "../lib/formatters";
|
||||
import { desktopPublishMediaCatalog } from "../lib/media-catalog";
|
||||
import { normalizePublisherErrorMessage } from "../../shared/publisher-errors";
|
||||
|
||||
const PAGE_SIZE = 10;
|
||||
|
||||
@@ -125,7 +126,7 @@ function normalizeTaskErrorMessage(message: string | null): string | null {
|
||||
if (normalized.includes("adapter is not implemented for this platform")) {
|
||||
return "当前平台的桌面发布适配器未实现,任务已按失败处理。";
|
||||
}
|
||||
return normalized;
|
||||
return normalizePublisherErrorMessage(normalized) ?? normalized;
|
||||
}
|
||||
|
||||
function summaryForTask(status: DesktopTaskInfo["status"]): string {
|
||||
|
||||
Reference in New Issue
Block a user