RED-5945: 500 when importing faulty archive
* now throwing a BadRequestException when archive is faulty
This commit is contained in:
parent
bc8ca76858
commit
209373d3fa
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user