streamer: handling errors does not happen, add workaround

This commit is contained in:
Jurgis Sakalauskas
2022-12-14 16:03:20 +02:00
parent df6bf9465f
commit 72c5684da9
2 changed files with 9 additions and 2 deletions
+6 -1
View File
@@ -138,7 +138,12 @@ export class AllFilesService {
const entity = await this.fileRepository.findOne({ where: { id: id } });
if (entity === null) {
throw new NotFoundException('entity not found id: ' + fileId);
response
.status(404)
.send('entity not found id: ' + fileId)
.end();
return;
}
this.streamerFacade.streamFile(request, response, entity.path);