diff --git a/backend/src/main/java/io/metersphere/track/issue/client/ZentaoClient.java b/backend/src/main/java/io/metersphere/track/issue/client/ZentaoClient.java index 34fc122dca..e917949ae5 100644 --- a/backend/src/main/java/io/metersphere/track/issue/client/ZentaoClient.java +++ b/backend/src/main/java/io/metersphere/track/issue/client/ZentaoClient.java @@ -43,10 +43,10 @@ public abstract class ZentaoClient extends BaseClient { HttpEntity> requestEntity = new HttpEntity<>(paramMap, new HttpHeaders()); ResponseEntity response = restTemplate.exchange(loginUrl + sessionId, HttpMethod.POST, requestEntity, String.class); getUserResponse = (GetUserResponse) getResultForObject(GetUserResponse.class, response); + } catch (JSONException e) { + MSException.throwException(Translator.get("zentao_test_type_error")); } catch (Exception e) { LogUtil.error(e); - if (e instanceof JSONException) - MSException.throwException(Translator.get("zentao_test_type_error")); MSException.throwException(e.getMessage()); } GetUserResponse.User user = getUserResponse.getUser();