|
@@ -50,7 +50,7 @@ public class FacePlusApiHelper {
|
|
|
|
|
|
String errorMessage = response.getError_message();
|
|
String errorMessage = response.getError_message();
|
|
if (StringUtils.isNotEmpty(errorMessage)) {
|
|
if (StringUtils.isNotEmpty(errorMessage)) {
|
|
- result.setApiRetry(true);// 默认值
|
|
|
|
|
|
+ result.setApiNeedRetry(true);// 默认值
|
|
result.setError(errorMessage);
|
|
result.setError(errorMessage);
|
|
|
|
|
|
if (errorMessage.startsWith("INVALID_IMAGE_SIZE")
|
|
if (errorMessage.startsWith("INVALID_IMAGE_SIZE")
|
|
@@ -60,7 +60,7 @@ public class FacePlusApiHelper {
|
|
// INVALID_IMAGE_URL 图片URL错误或者无效
|
|
// INVALID_IMAGE_URL 图片URL错误或者无效
|
|
// IMAGE_FILE_TOO_LARGE 图像文件太大,图片文件大小不超过2MB
|
|
// IMAGE_FILE_TOO_LARGE 图像文件太大,图片文件大小不超过2MB
|
|
|
|
|
|
- result.setApiRetry(false);
|
|
|
|
|
|
+ result.setApiNeedRetry(false);
|
|
}
|
|
}
|
|
|
|
|
|
// 请求并发超限(约20个/秒,可按需调整)
|
|
// 请求并发超限(约20个/秒,可按需调整)
|
|
@@ -112,7 +112,7 @@ public class FacePlusApiHelper {
|
|
|
|
|
|
String errorMessage = response.getError_message();
|
|
String errorMessage = response.getError_message();
|
|
if (StringUtils.isNotEmpty(errorMessage)) {
|
|
if (StringUtils.isNotEmpty(errorMessage)) {
|
|
- result.setApiRetry(true);// 默认值
|
|
|
|
|
|
+ result.setApiNeedRetry(true);// 默认值
|
|
result.setError(errorMessage);
|
|
result.setError(errorMessage);
|
|
|
|
|
|
if (errorMessage.startsWith("INVALID_IMAGE_SIZE")
|
|
if (errorMessage.startsWith("INVALID_IMAGE_SIZE")
|
|
@@ -122,7 +122,7 @@ public class FacePlusApiHelper {
|
|
// INVALID_IMAGE_URL 图片URL错误或者无效
|
|
// INVALID_IMAGE_URL 图片URL错误或者无效
|
|
// IMAGE_FILE_TOO_LARGE 图像文件太大,图片文件大小不超过2MB
|
|
// IMAGE_FILE_TOO_LARGE 图像文件太大,图片文件大小不超过2MB
|
|
|
|
|
|
- result.setApiRetry(false);
|
|
|
|
|
|
+ result.setApiNeedRetry(false);
|
|
}
|
|
}
|
|
|
|
|
|
// 请求并发超限(约20个/秒,可按需调整)
|
|
// 请求并发超限(约20个/秒,可按需调整)
|