diff --git a/src/commands/app/create.ts b/src/commands/app/create.ts index 85a2cf0..9d0fcb8 100644 --- a/src/commands/app/create.ts +++ b/src/commands/app/create.ts @@ -24,6 +24,7 @@ import { installAiHelpHook } from '../../core/help.ts' import { log } from '../../core/log.ts' import { saveToken } from '../../core/config.ts' import type { TokenFile } from '../../core/types.ts' +import { enhanceFromBackend, formatErrorLine } from '../_error_codes.ts' interface CreateOpts { appCode: string @@ -91,7 +92,8 @@ export function buildAppCreateCommand(): Command { } const r = await c.postJson('/system/System', body) if (r.code !== 200) { - log.error(` ✗ 创建系统失败: code=${r.code} ${r.msg}`) + const enhanced = enhanceFromBackend(r.msg || '', 'appSystem', { entity: 'app' }) + log.error(` ✗ ${formatErrorLine(enhanced, { step: 1, stepName: '创建系统' })}`) process.exit(1) } // 创建后再查一次拿 id