diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HttpClientManager.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HttpClientManager.java index 261153eea7..2b48025317 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HttpClientManager.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HttpClientManager.java @@ -29,7 +29,6 @@ import org.springframework.util.CollectionUtils; import javax.crypto.Mac; import javax.crypto.spec.SecretKeySpec; import java.io.ByteArrayOutputStream; -import java.io.File; import java.io.IOException; import java.io.InputStream; import java.net.URLEncoder; @@ -190,7 +189,8 @@ public class HttpClientManager { String result = EntityUtils.toString(response.getEntity()); return new Result().ok(result); } else { - log.warn("execute http method fail,httpStatus:{0}", response.getStatusLine().getStatusCode()); + log.warn("execute http method fail,httpStatus:{}", response.getStatusLine().getStatusCode()); + return new Result().error(EpmetErrorCode.SERVER_ERROR.getCode(),"请求失败httpStatus:"+response.getStatusLine().getStatusCode()); } } } catch (Exception e) {