AI接口调用失败提示

master
gongzhenkun 2 years ago
parent b94b8c9a50
commit e9be9c0948

@ -6,6 +6,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.config.RuoYiConfig;
import com.ruoyi.common.constant.Constants;
import com.ruoyi.common.constant.HttpStatus;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
@ -474,7 +475,7 @@ public class AppController extends BaseController
// AI接口异常需要重置当前记录状态
updateRecordStatus(recordId, "0");
logger.error("AI result exception, msg is {}", e.getMessage());
return AjaxResult.error("AI result exception, message is {}", e.getMessage());
return AjaxResult.error(HttpStatus.AI_EXCEPTION, "AI接口调用失败");
}
if (StringUtils.isEmpty(result)) {
// AI接口非正常返回需要重置当前记录状态

@ -27,6 +27,11 @@ public class HttpStatus
*/
public static final int NO_CONTENT = 204;
/**
* AI
*/
public static final int AI_EXCEPTION = 206;
/**
*
*/

Loading…
Cancel
Save