diff --git a/src/commands/portal/release.ts b/src/commands/portal/release.ts index 6c7c192..c1b1291 100644 --- a/src/commands/portal/release.ts +++ b/src/commands/portal/release.ts @@ -13,6 +13,7 @@ import { Command } from 'commander' import { JnpfClient } from '../../core/client.ts' import { installAiHelpHook } from '../../core/help.ts' import { log } from '../../core/log.ts' +import { enhanceFromBackend, formatErrorLine } from '../_error_codes.ts' interface ReleaseOpts { id: string @@ -39,7 +40,8 @@ export function buildPortalReleaseCommand(): Command { } const r = await c.putJson(`/visualdev/Portal/Actions/release/${opts.id}`, body) if (r.code !== 200) { - log.error(`portal release 失败 (code=${r.code}): ${r.msg}`) + const enhanced = enhanceFromBackend(r.msg || '', 'portal', { entity: 'portal' }) + log.error(` ${formatErrorLine(enhanced, { step: 0, stepName: '后端API' })}`) process.exit(1) } log.info(`✓ 门户 id=${opts.id} 已发布 (pc=${pc} app=${app})`)