RED-5945: 500 when importing faulty archive #169
@ -280,6 +280,9 @@ public class DossierTemplateImportService {
|
||||
|
||||
}
|
||||
}
|
||||
if(importTemplateResult.getDossierTemplate() == null) {
|
||||
throw new BadRequestException("Provided archive is faulty");
|
||||
}
|
||||
return importTemplateResult;
|
||||
} finally {
|
||||
if (tempFile != null) {
|
||||
@ -289,7 +292,7 @@ public class DossierTemplateImportService {
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (IOException | BadRequestException e) {
|
||||
} catch (IOException e) {
|
||||
throw new BadRequestException(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user