RED-5945: 500 when importing faulty archive

* now throwing a BadRequestException when archive is faulty
This commit is contained in:
yhampe 2023-10-10 14:07:22 +02:00
parent bc8ca76858
commit 209373d3fa

View File

@ -113,9 +113,6 @@ 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);
}
@ -295,7 +292,7 @@ public class DossierTemplateImportService {
}
}
}
} catch (IOException | BadRequestException e) {
} catch (IOException e) {
throw new BadRequestException(e.getMessage(), e);
}
}