f
This commit is contained in:
@@ -25,6 +25,10 @@ var (
|
||||
ErrBusiness = errors.New("业务失败")
|
||||
ErrSubordinateLinkNotFound = errors.New("非子账号,无法使用master_accessid")
|
||||
ErrSubordinateParentMismatch = errors.New("master_accessid与主账号不匹配")
|
||||
ErrMissingMgmtKey = errors.New("缺少管理密钥")
|
||||
ErrInvalidMgmtKey = errors.New("管理密钥无效")
|
||||
ErrPublicAPIDisabled = errors.New("公开接口未启用")
|
||||
ErrWhitelistExists = errors.New("规则已存在")
|
||||
)
|
||||
|
||||
// 错误码映射 - 严格按照用户要求
|
||||
@@ -50,6 +54,10 @@ var ErrorCodeMap = map[error]int{
|
||||
ErrBusiness: 2001,
|
||||
ErrSubordinateLinkNotFound: 1301,
|
||||
ErrSubordinateParentMismatch: 1302,
|
||||
ErrMissingMgmtKey: 1010,
|
||||
ErrInvalidMgmtKey: 1011,
|
||||
ErrPublicAPIDisabled: 1012,
|
||||
ErrWhitelistExists: 1013,
|
||||
}
|
||||
|
||||
// GetErrorCode 获取错误对应的错误码
|
||||
|
||||
Reference in New Issue
Block a user