diff --git a/backend/src/main/java/io/metersphere/track/issue/client/JiraAbstractClient.java b/backend/src/main/java/io/metersphere/track/issue/client/JiraAbstractClient.java index 6b8fc1acc1..c3ae397b30 100644 --- a/backend/src/main/java/io/metersphere/track/issue/client/JiraAbstractClient.java +++ b/backend/src/main/java/io/metersphere/track/issue/client/JiraAbstractClient.java @@ -11,6 +11,7 @@ import org.springframework.core.io.FileSystemResource; import org.springframework.http.*; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; +import org.springframework.web.client.HttpClientErrorException; import java.io.File; import java.util.List; @@ -110,7 +111,13 @@ public abstract class JiraAbstractClient extends BaseClient { public void deleteIssue(String id) { LogUtil.info("deleteIssue: " + id); - restTemplate.exchange(getBaseUrl() + "/issue/" + id, HttpMethod.DELETE, getAuthHttpEntity(), String.class); + try { + restTemplate.exchange(getBaseUrl() + "/issue/" + id, HttpMethod.DELETE, getAuthHttpEntity(), String.class); + } catch (HttpClientErrorException e) { + if (e.getRawStatusCode() != 404) {// 404说明jira没有,可以直接删 + MSException.throwException(e.getMessage()); + } + } } diff --git a/backend/src/main/java/io/metersphere/xpack b/backend/src/main/java/io/metersphere/xpack index cbcdbbbd93..b35dfb7f45 160000 --- a/backend/src/main/java/io/metersphere/xpack +++ b/backend/src/main/java/io/metersphere/xpack @@ -1 +1 @@ -Subproject commit cbcdbbbd9395fb54256fc91182ef90b76f1d0bfc +Subproject commit b35dfb7f4571ed9e9496ff67339b9118232b4bbd