[feat] 新增验证码错误代码
This commit is contained in:
parent
cbd80e752f
commit
fc966787b4
19
errno.go
19
errno.go
@ -55,16 +55,16 @@ var (
|
|||||||
ErrDatabase = &Errno{Code: 20100, Msg: "数据库错误"}
|
ErrDatabase = &Errno{Code: 20100, Msg: "数据库错误"}
|
||||||
ErrDBFill = &Errno{Code: 20101, Msg: "从数据库填充 struct 时发生错误"}
|
ErrDBFill = &Errno{Code: 20101, Msg: "从数据库填充 struct 时发生错误"}
|
||||||
ErrDBQuery = &Errno{Code: 20102, Msg: "数据查询错误"}
|
ErrDBQuery = &Errno{Code: 20102, Msg: "数据查询错误"}
|
||||||
ErrDBStore = &Errno{Code: 20102, Msg: "数据保存错误"}
|
ErrDBStore = &Errno{Code: 20103, Msg: "数据保存错误"}
|
||||||
ErrDBUpdate = &Errno{Code: 20103, Msg: "数据更新错误"}
|
ErrDBUpdate = &Errno{Code: 20104, Msg: "数据更新错误"}
|
||||||
ErrDBDelete = &Errno{Code: 20104, Msg: "数据删除错误"}
|
ErrDBDelete = &Errno{Code: 20105, Msg: "数据删除错误"}
|
||||||
ErrDBTransaction = &Errno{Code: 20105, Msg: "数据库事务错误"}
|
ErrDBTransaction = &Errno{Code: 20106, Msg: "数据库事务错误"}
|
||||||
|
|
||||||
// 认证错误, 前缀是 202
|
// 认证错误, 前缀是 202
|
||||||
ErrTokenValidation = &Errno{Code: 20201, Msg: "验证失败"}
|
ErrTokenValidation = &Errno{Code: 20201, Msg: "验证失败"}
|
||||||
ErrTokenInvalid = &Errno{Code: 20202, Msg: "token 无效"}
|
ErrTokenInvalid = &Errno{Code: 20202, Msg: "token 无效"}
|
||||||
ErrTokenExpired = &Errno{Code: 20202, Msg: "token 过期"}
|
ErrTokenExpired = &Errno{Code: 20203, Msg: "token 过期"}
|
||||||
ErrTokenNotFound = &Errno{Code: 20202, Msg: "token 不存在"}
|
ErrTokenNotFound = &Errno{Code: 20204, Msg: "token 不存在"}
|
||||||
|
|
||||||
// 用户错误, 前缀为 203
|
// 用户错误, 前缀为 203
|
||||||
ErrUserNotLogin = &Errno{Code: 20300, Msg: "请先登录"}
|
ErrUserNotLogin = &Errno{Code: 20300, Msg: "请先登录"}
|
||||||
@ -95,6 +95,13 @@ var (
|
|||||||
// 请求第三个接口
|
// 请求第三个接口
|
||||||
ErrApiRequest = &Errno{Code: 20501, Msg: "Api Request Error"}
|
ErrApiRequest = &Errno{Code: 20501, Msg: "Api Request Error"}
|
||||||
ErrApiResponsed = &Errno{Code: 20502, Msg: "Api Responsed Error"}
|
ErrApiResponsed = &Errno{Code: 20502, Msg: "Api Responsed Error"}
|
||||||
|
|
||||||
|
// 验证码错误,206
|
||||||
|
ErrCaptcha = &Errno{Code: 20600, Msg: "验证码错误"}
|
||||||
|
ErrCaptchaInvalid = &Errno{Code: 20601, Msg: "验证码错误"}
|
||||||
|
ErrCaptchaExpired = &Errno{Code: 20602, Msg: "验证码已过期"}
|
||||||
|
ErrCaptchaSend = &Errno{Code: 20603, Msg: "验证码发送错误"}
|
||||||
|
ErrCaptchaSendInterval = &Errno{Code: 20604, Msg: "验证码发送失败, 请稍后再试"}
|
||||||
)
|
)
|
||||||
|
|
||||||
// 使用 错误码 和 error 创建新的 错误
|
// 使用 错误码 和 error 创建新的 错误
|
||||||
|
Loading…
Reference in New Issue
Block a user