Skip to content

Commit fb7e0c3

Browse files
committed
perf: 优化代码源webhook解析流程 #11694
1 parent cef9c43 commit fb7e0c3

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

devops-scm-api/src/main/java/com/tencent/devops/scm/api/exception/NotFoundScmApiException.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@
88
*/
99
@Getter
1010
public class NotFoundScmApiException extends ScmApiException {
11-
int code = 404;
12-
1311
public NotFoundScmApiException(String message) {
1412
super(message);
13+
this.code = 404;
1514
}
1615

1716
public NotFoundScmApiException(String message, Throwable cause) {

devops-scm-api/src/main/java/com/tencent/devops/scm/api/exception/ScmApiException.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
package com.tencent.devops.scm.api.exception;
22

3-
import lombok.Data;
43
import lombok.Getter;
54

65
/**
76
* scm api异常基类
87
*/
98
@Getter
109
public class ScmApiException extends RuntimeException {
11-
int code;
10+
Integer code;
1211

1312
public ScmApiException(String message, int code) {
1413
super(message);

devops-scm-api/src/main/java/com/tencent/devops/scm/api/exception/UnAuthorizedScmApiException.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@
99
* 4. 权限范围不足
1010
*/
1111
public class UnAuthorizedScmApiException extends ScmApiException {
12-
int code = 401;
13-
1412
public UnAuthorizedScmApiException(String message) {
1513
super(message);
14+
this.code = 401;
1615
}
1716

1817
public UnAuthorizedScmApiException(String message, Throwable cause) {

0 commit comments

Comments
 (0)