This commit is contained in:
2025-09-30 12:03:51 +08:00
parent 1b931cb816
commit 532b92713b
17 changed files with 734 additions and 46 deletions

View File

@@ -19,6 +19,7 @@ import (
var (
ErrDatasource = errors.New("数据源异常")
ErrSystem = errors.New("系统异常")
ErrNotFound = errors.New("查询为空")
)
type WestResp struct {
@@ -321,8 +322,8 @@ func (w *WestDexService) G05HZ01CallAPI(ctx context.Context, code string, reqDat
}
if westDexResp.Code != "0000" {
if westDexResp.Data == nil {
err = errors.Join(ErrSystem, fmt.Errorf(westDexResp.Message))
if westDexResp.Data == nil || westDexResp.Code == "1404" {
err = errors.Join(ErrNotFound, fmt.Errorf(westDexResp.Message))
if w.logger != nil {
w.logger.LogErrorWithResponseID(requestID, transactionID, code, err, reqData, westDexResp.ID)
}