MCPcopy Create free account
hub / github.com/bigcyy/customized-chat / ErrorCode

Enum ErrorCode

common/src/main/java/com/cyy/common/enums/ErrorCode.java:34–56  ·  view source on GitHub ↗

错误码的规范,采用 ABCDE 五位数错误码 默认 00000 为成功 A 位: 错误等级 - A: 表示客户端错误 - B: 表示服务端错误 BC 位:业务模块 - 00:通用错误(未分类) - 01:用户相关 - 02:设置相关 - 03:知识库相关 - 04:应用相关 - 05:对话相关 DE 位:具体错误类型 - 00:未知错误 - 01:缺少必要参数 - 02:参数格式错误 - 03:未授权访问 - 04:资源不存在 - 05:操作失败(具体原因待补充) - 06:请求超时 - 07:资源已存在 - 08:数据校验失败 @author wint

Source from the content-addressed store, hash-verified

32 * @author CYY
33 */
34@Getter
35public enum ErrorCode {
36
37 SUCCESS("00000", "success"),
38 CLIENT_ERROR("A0000","客户端错误"),
39 SYSTEM_ERROR("B0000", "系统内部异常");
40
41 /**
42 * 状态码
43 */
44 private final String code;
45
46 /**
47 * 信息
48 */
49 private final String message;
50
51 ErrorCode(String code, String message) {
52 this.code = code;
53 this.message = message;
54 }
55
56}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected