Refactoring exception throw for backup import (#1698)

* refactor: blog import exception
pull/1701/head
guqing 2022-03-03 17:06:08 +08:00 committed by GitHub
parent d438163c04
commit c9f7bd1abb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -456,7 +456,7 @@ public class BackupServiceImpl implements BackupService {
String version = (String) Objects.requireNonNullElse(data.get("version"), "");
if (!VersionUtil.hasSameMajorAndMinorVersion(HaloConst.HALO_VERSION, version)) {
throw new IllegalArgumentException("导入数据的主次版本号与当前系统版本号不匹配,不支持导入!");
throw new BadRequestException("导入数据的主次版本号与当前系统版本号不匹配,不支持导入!");
}
List<Attachment> attachments = Arrays.asList(mapper