错误码枚举源码
# 错误码枚举源码
```java
public enum ErrorCodeEnum {
/**
* 校验失败错误
*/
INVALID_ERROR(10400, "校验错误"),
/**
* 通用错误
*/
UNDEFINE_ERROR(10000, "未知错误"),
ELASTICSEARCH_INDEX_FAILURE(11500, "索引文档失败"),
PRODUCT_UP_FAILURE(10540, "商品上传失败"),
PRODUCT_UP_FAILURE(10540, "商品上传失败"),
SMS_FAILURE(15001, "获取验证码过于频繁, 不予获取"),
SMS_GET_FAILURE(15001, "获取验证码失败"),
LOGIN_FAILURE(14001, "用户名或密码错误"),
OAUTH_LOGIN_FAILURE(14002, "第三方登陆失败");
private int code;
private String message;
ErrorCodeEnum(int code, String message) {
this.code = code;
this.message = message;
}
public String getMessage() {
return message;
}
public int getCode() {
return code;
}
}
```