liuyun 062b314844
Some checks are pending
CI / backend (push) Waiting to run
CI / frontend (push) Waiting to run
feat(error): 业务错误码注册表(子模块 + openspec change + guide)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-11 22:42:18 +08:00

19 lines
775 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

## 1. 基础设施
- [x] 1.1 新增 `src/common/error-codes.ts`(域码 + 通用码 + 各域码集中登记)
- [x] 1.2 新增 `src/common/business-exception.ts`(`BusinessException(code, message, status)`)
- [x] 1.3 `AllExceptionsFilter` 识别 `BusinessException`,否则回退 `status×100`
## 2. 迁移关键错误
- [x] 2.1 `auth.service`:登录失败/锁定/停用/待改密/原密码错误
- [x] 2.2 `users.service`:用户名冲突、用户不存在
- [x] 2.3 `tenants.service`:租户不存在/已存在
- [x] 2.4 `sessions.service`:会话不存在
## 3. 文档与验证
- [x] 3.1 guide.md 补错误码注册表说明
- [x] 3.2 后端 build + 单测 + e2e 通过
- [x] 3.3 冒烟:触发一个业务错误,返回注册业务码而非 status×100