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