mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2025-01-31 17:40:05 +08:00
处理异常结果,日志输出
This commit is contained in:
parent
e6bc5cf069
commit
6adb8d657c
@ -47,10 +47,12 @@ public class MjImagineInteractions implements MjInteractions {
|
||||
String requestBody = MjClient.setParams(requestTemplate, requestParams);
|
||||
// 发送请求
|
||||
String res = MjClient.post(url, midjourneyConfig.getToken(), requestBody);
|
||||
//
|
||||
System.err.println(res);
|
||||
log.info(res);
|
||||
// 这个 res 只要不返回值,就是成功!
|
||||
return StrUtil.isBlank(res);
|
||||
boolean isSuccess = StrUtil.isBlank(res);
|
||||
if (isSuccess) {
|
||||
return true;
|
||||
}
|
||||
log.error("请求失败! 请求参数:{} 返回结果! {}", requestBody, res);
|
||||
return isSuccess;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user