Files
ai4se-harness-suite/example-project/docs/facts/tech-topic/error-code.md
ning-inspire 670e0c1fa1 refactor: 默认 skills 装到 .agents,并清空 example 旧演示实现
对齐安装目录与 opencode 扫描路径;按 confirmed plan 清掉与 iteration1 不对齐的示例业务代码与 as-built 文档,只留空壳与需求输入。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-17 13:22:29 +08:00

18 lines
757 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.
# 错误码清单
> 框架约定(空壳 as-built)。业务专属错误码待 iteration1 实现后补充。
> 与 `GlobalExceptionHandler` 及 `docs/standards/error.md` 对齐。
## 当前 Handler 映射
| 抛出 | HTTP | errorCode | 说明 |
|------|------|-----------|------|
| `IllegalArgumentException` | 400 | `PARAM_ERROR` | 参数/资源不合法 |
| `IllegalStateException` | 409 | `BUSINESS_CONFLICT` | 业务状态冲突 |
| `MethodArgumentNotValidException` | 400 | `VALIDATION_ERROR` | `@Valid` 失败 |
| 其它 `Exception` | 500 | `SYSTEM_ERROR` | 兜底(对外「系统繁忙」) |
鉴权失败由 Spring Security 直接返回 **401 / 403**,不走 `ErrorResponse`。
响应体字段:`errorCode` / `errorMessage` / `data`。