add qcxg7a2b
This commit is contained in:
		| @@ -73,9 +73,10 @@ func (h *ApiHandler) HandleApiCall(c *gin.Context) { | ||||
| 	// 3. 调用应用服务 | ||||
| 	transactionId, encryptedResp, err := h.appService.CallApi(c.Request.Context(), &cmd) | ||||
| 	if err != nil { | ||||
| 		// 根据错误类型返回对应的错误码 | ||||
| 		// 根据错误类型返回对应的错误码和预定义错误消息 | ||||
| 		errorCode := api.GetErrorCode(err) | ||||
| 		response := dto.NewErrorResponse(errorCode, err.Error(), transactionId) | ||||
| 		errorMessage := api.GetErrorMessage(err) | ||||
| 		response := dto.NewErrorResponse(errorCode, errorMessage, transactionId) | ||||
| 		c.JSON(200, response) // API调用接口统一返回200状态码 | ||||
| 		return | ||||
| 	} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user