f
This commit is contained in:
@@ -20,6 +20,7 @@ import (
|
||||
var (
|
||||
ErrDatasource = errors.New("数据源异常")
|
||||
ErrSystem = errors.New("系统异常")
|
||||
ErrQueryEmpty = errors.New("查询为空")
|
||||
)
|
||||
|
||||
// ShujubaoResp 数据宝 API 通用响应(按实际文档调整)
|
||||
@@ -253,7 +254,10 @@ func (s *ShujubaoService) CallAPI(ctx context.Context, apiPath string, params ma
|
||||
}
|
||||
|
||||
code := shujubaoResp.Code
|
||||
if code != "10000" && code != "10006" {
|
||||
if code == "10001" || code == "10006" {
|
||||
return nil, ErrQueryEmpty
|
||||
}
|
||||
if code != "10000" {
|
||||
shujubaoErr := NewShujubaoErrorFromCode(code, shujubaoResp.Message)
|
||||
if s.logger != nil {
|
||||
s.logger.LogError(requestID, transactionID, apiPath, shujubaoErr, params)
|
||||
|
||||
Reference in New Issue
Block a user