Skip to content

Commit

Permalink
perf: 更新文件源接口只传id不传code时报错 TencentBlueKing#2414
Browse files Browse the repository at this point in the history
  • Loading branch information
liuliaozhong committed Oct 23, 2023
1 parent 7e1f2a6 commit 0490695
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@
1260016=At least one of id/code required
1260017=FileSource[id={0}] does not belong to specified business
1260018=FileWorker response error, Detail:{0}
1260019=File source code can not empty
1260019=File source code can not be empty

## Business error (job-file-worker)
1262001=Third file source response error:ListBucket, Detail:{0}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@
1260016=At least one of id/code required
1260017=FileSource[id={0}] does not belong to specified business
1260018=FileWorker response error, Detail:{0}
1260019=File source code can not empty
1260019=File source code can not be empty

## Business error (job-file-worker)
1262001=Third file source response error:ListBucket, Detail:{0}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ public class ErrorCode {
// 接入点响应异常,详情:{0}
public static final int FAIL_TO_REQUEST_FILE_WORKER_WITH_REASON = 1260018;
// 文件源code不可为空
public static final int FILE_SOURCE_CODE_NOT_EMPTY = 1260019;
public static final int FILE_SOURCE_CODE_CAN_NOT_BE_EMPTY = 1260019;

// 文件网关 end
// 文件代理 start
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ private Integer checkUpdateParamAndGetId(EsbCreateOrUpdateFileSourceV3Req req) {
Long appId = req.getAppId();
String code = req.getCode();
if (StringUtils.isBlank(code)) {
throw new MissingParameterException(ErrorCode.FILE_SOURCE_CODE_NOT_EMPTY);
throw new MissingParameterException(ErrorCode.FILE_SOURCE_CODE_CAN_NOT_BE_EMPTY);
}
Integer id = fileSourceService.getFileSourceIdByCode(appId, code);
if (id == null) {
Expand Down

0 comments on commit 0490695

Please sign in to comment.