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

View File

@ -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);
}
}