diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/MicroService.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/MicroService.java index 69e51515be..813f9f4cca 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/MicroService.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/MicroService.java @@ -180,12 +180,12 @@ public class MicroService { ResponseEntity entity = restTemplate.exchange(chooseService(serviceId, url), HttpMethod.POST, httpEntity, ResultHolder.class); return entity.getBody(); } catch (Exception e) { + String massage = "服务调用出错[serviceId:" + serviceId + ",url:" + url + "],错误信息:" + e.getMessage(); + LogUtil.error(massage, e); if (e instanceof HttpServerErrorException) { this.handleHttpServerErrorException((HttpServerErrorException) e); return null; } - String massage = "服务调用出错[serviceId:" + serviceId + ",url:" + url + "],错误信息:" + e.getMessage(); - LogUtil.error(massage, e); MSException.throwException(massage); } return null;