f
This commit is contained in:
@@ -425,6 +425,9 @@ func (s *ApiApplicationServiceImpl) callExternalApi(ctx context.Context, cmd *co
|
||||
zap.String("error_type", mappedErrorType),
|
||||
zap.Error(err))
|
||||
|
||||
if errors.Is(err, processors.ErrContactBusiness) {
|
||||
return "", ErrContactBusiness
|
||||
}
|
||||
if mappedErrorType == entities.ApiCallErrorInvalidParam {
|
||||
return "", ErrInvalidParam
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ var (
|
||||
ErrSubscriptionExpired = errors.New("订阅已过期")
|
||||
ErrSubscriptionSuspended = errors.New("订阅已暂停")
|
||||
ErrBusiness = errors.New("业务失败")
|
||||
ErrContactBusiness = errors.New("请联系商务咨询")
|
||||
ErrSubordinateLinkNotFound = errors.New("非子账号,无法使用master_accessid")
|
||||
ErrSubordinateParentMismatch = errors.New("master_accessid与主账号不匹配")
|
||||
ErrMissingMgmtKey = errors.New("缺少管理密钥")
|
||||
@@ -55,6 +56,7 @@ var ErrorCodeMap = map[error]int{
|
||||
ErrSubscriptionExpired: 1008,
|
||||
ErrSubscriptionSuspended: 1008,
|
||||
ErrBusiness: 2001,
|
||||
ErrContactBusiness: 2001,
|
||||
ErrSubordinateLinkNotFound: 1301,
|
||||
ErrSubordinateParentMismatch: 1302,
|
||||
ErrMissingMgmtKey: 1010,
|
||||
|
||||
@@ -4,8 +4,9 @@ import "errors"
|
||||
|
||||
// 处理器相关错误类型
|
||||
var (
|
||||
ErrDatasource = errors.New("数据源异常")
|
||||
ErrSystem = errors.New("系统异常")
|
||||
ErrInvalidParam = errors.New("参数校验不正确")
|
||||
ErrNotFound = errors.New("查询为空")
|
||||
ErrDatasource = errors.New("数据源异常")
|
||||
ErrSystem = errors.New("系统异常")
|
||||
ErrInvalidParam = errors.New("参数校验不正确")
|
||||
ErrNotFound = errors.New("查询为空")
|
||||
ErrContactBusiness = errors.New("请联系商务咨询")
|
||||
)
|
||||
|
||||
@@ -21,12 +21,7 @@ func ProcessIVYZ18HYRequest(ctx context.Context, params []byte, deps *processors
|
||||
return nil, errors.Join(processors.ErrInvalidParam, err)
|
||||
}
|
||||
|
||||
fixedData := map[string]interface{}{"msg": "请联系商务咨询"}
|
||||
fixedRespBytes, err := json.Marshal(fixedData)
|
||||
if err != nil {
|
||||
return nil, errors.Join(processors.ErrSystem, err)
|
||||
}
|
||||
return fixedRespBytes, nil
|
||||
return nil, processors.ErrContactBusiness
|
||||
|
||||
authDate := ""
|
||||
if len(paramsDto.AuthDate) >= 8 {
|
||||
|
||||
@@ -21,12 +21,7 @@ func ProcessIVYZ28HYRequest(ctx context.Context, params []byte, deps *processors
|
||||
return nil, errors.Join(processors.ErrInvalidParam, err)
|
||||
}
|
||||
|
||||
fixedData := map[string]interface{}{"msg": "请联系商务咨询"}
|
||||
fixedRespBytes, err := json.Marshal(fixedData)
|
||||
if err != nil {
|
||||
return nil, errors.Join(processors.ErrSystem, err)
|
||||
}
|
||||
return fixedRespBytes, nil
|
||||
return nil, processors.ErrContactBusiness
|
||||
|
||||
reqParams := map[string]interface{}{
|
||||
"key": "",
|
||||
|
||||
@@ -21,12 +21,7 @@ func ProcessIVYZ38SRRequest(ctx context.Context, params []byte, deps *processors
|
||||
return nil, errors.Join(processors.ErrInvalidParam, err)
|
||||
}
|
||||
|
||||
fixedData := map[string]interface{}{"msg": "请联系商务咨询"}
|
||||
fixedRespBytes, err := json.Marshal(fixedData)
|
||||
if err != nil {
|
||||
return nil, errors.Join(processors.ErrSystem, err)
|
||||
}
|
||||
return fixedRespBytes, nil
|
||||
return nil, processors.ErrContactBusiness
|
||||
|
||||
reqParams := map[string]interface{}{
|
||||
"key": "",
|
||||
|
||||
@@ -21,12 +21,7 @@ func ProcessIVYZ48SRRequest(ctx context.Context, params []byte, deps *processors
|
||||
return nil, errors.Join(processors.ErrInvalidParam, err)
|
||||
}
|
||||
|
||||
fixedData := map[string]interface{}{"msg": "请联系商务咨询"}
|
||||
fixedRespBytes, err := json.Marshal(fixedData)
|
||||
if err != nil {
|
||||
return nil, errors.Join(processors.ErrSystem, err)
|
||||
}
|
||||
return fixedRespBytes, nil
|
||||
return nil, processors.ErrContactBusiness
|
||||
|
||||
reqParams := map[string]interface{}{
|
||||
"key": "",
|
||||
|
||||
Reference in New Issue
Block a user