fix: URL导入失败
This commit is contained in:
parent
55a2a96da3
commit
354c6afca4
|
@ -264,7 +264,7 @@ public class APITestService {
|
||||||
ApiImportParser apiImportParser = ApiImportParserFactory.getApiImportParser(request.getPlatform());
|
ApiImportParser apiImportParser = ApiImportParserFactory.getApiImportParser(request.getPlatform());
|
||||||
ApiImport apiImport = null;
|
ApiImport apiImport = null;
|
||||||
try {
|
try {
|
||||||
apiImport = Objects.requireNonNull(apiImportParser).parse(file.getInputStream(), request);
|
apiImport = Objects.requireNonNull(apiImportParser).parse(file == null ? null : file.getInputStream(), request);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
LogUtil.error(e.getMessage(), e);
|
LogUtil.error(e.getMessage(), e);
|
||||||
MSException.throwException(Translator.get("parse_data_error"));
|
MSException.throwException(Translator.get("parse_data_error"));
|
||||||
|
|
Loading…
Reference in New Issue