RED-5945: 500 when importing faulty archive #169

Merged
yannik.hampe merged 2 commits from RED-5945 into master 2023-10-10 16:02:55 +02:00
Showing only changes of commit bc8ca76858 - Show all commits

View File

@ -113,6 +113,9 @@ public class DossierTemplateImportService {
public String importDossierTemplate(ImportDossierTemplateRequest request) {
ImportTemplateResult archiveResult = this.handleArchive(request);
if(archiveResult == null) {
throw new BadRequestException("The provided archive is faulty");
}
return this.importDossierTemplate(archiveResult);
}
@ -280,6 +283,9 @@ public class DossierTemplateImportService {
}
}
if(importTemplateResult.getDossierTemplate() == null) {
throw new BadRequestException("Provided archive is faulty");
}
return importTemplateResult;
} finally {
if (tempFile != null) {