From 42c72713fbe4ab4aaa94c1d00b7a889003c25fc3 Mon Sep 17 00:00:00 2001 From: Vins Date: Fri, 16 Feb 2024 16:00:07 +0100 Subject: [PATCH] Fixed no file error --- src/app/api/notary/BucketController.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/app/api/notary/BucketController.ts b/src/app/api/notary/BucketController.ts index 24c4f2ac..555e6d5d 100644 --- a/src/app/api/notary/BucketController.ts +++ b/src/app/api/notary/BucketController.ts @@ -32,12 +32,13 @@ export default class BucketController extends ApiController { const fileName = office.rib_name; if(!fileName) { + this.httpNotFoundRequest(response, "No file found"); return; } try { - const file = await this.bucketService.getByUid(uid, fileName); - response.attachment(fileName); + const file = await this.bucketService.getByUid(uid, fileName!); + response.attachment(fileName!); response.send(file.Body); } catch (error) { this.httpInternalError(response, error);