This commit is contained in:
2026-04-25 21:00:22 +08:00
parent d564f4eb1b
commit fcbd534b57
2 changed files with 60 additions and 0 deletions

View File

@@ -5,6 +5,7 @@ import "errors"
// API调用相关错误类型
var (
ErrQueryEmpty = errors.New("查询为空")
ErrQueryFailed = errors.New("查询失败")
ErrSystem = errors.New("接口异常")
ErrDecryptFail = errors.New("解密失败")
ErrRequestParam = errors.New("请求参数结构不正确")
@@ -27,6 +28,7 @@ var (
// 错误码映射 - 严格按照用户要求
var ErrorCodeMap = map[error]int{
ErrQueryEmpty: 1000,
ErrQueryFailed: 1000,
ErrSystem: 1001,
ErrDecryptFail: 1002,
ErrRequestParam: 1003,