Skip to content

Commit ee2efd4

Browse files
committed
feat: 添加一些 Reason Code 到枚举类
1 parent dabe3e4 commit ee2efd4

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

src/main/java/info/cadecode/simple/constant/ReasonEnum.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,27 @@
77
*/
88
public enum ReasonEnum {
99

10+
// 200 成功
1011
OK(200, "OK"),
12+
OK_ADD(201, "Add success"),
13+
OK_DEL(202, "Delete success"),
14+
OK_UPDATE(203, "Update success"),
15+
16+
// 400 客户端错误
1117
BAD_REQ(400, "错误的请求"),
18+
NO_AUTH(401, "未经验证的请求"),
19+
FORBIDDEN(403, "被拒绝的请求"),
20+
NOT_EXIT(404, "不存在的资源"),
21+
NOT_FIT(405, "不支持的请求方法式"),
22+
TOO_MUCH(429, "过于频繁的请求"),
23+
24+
// 500 服务端错误
1225
ERROR(500, "内部服务错误"),
26+
INVALID_PROXY(502, "无效代理"),
27+
TEMP_INVALID(503, "服务暂时失效"),
28+
PROXY_TIME_OUT(504, "代理超时"),
1329

30+
// 自定义异常 Reason
1431

1532
;
1633

0 commit comments

Comments
 (0)