From c2356f066e020e4de29fd04683d2a86140881ffa Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Wed, 16 Oct 2024 01:40:53 +0530 Subject: [PATCH] feat: improve error handling --- server/src/models/Run.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/models/Run.ts b/server/src/models/Run.ts index 7d581d86..332fc059 100644 --- a/server/src/models/Run.ts +++ b/server/src/models/Run.ts @@ -44,7 +44,6 @@ class Run extends Model implements RunAttr public async uploadBinaryOutputToMinioBucket(key: string, data: Buffer): Promise { const bucketName = 'maxun-run-screenshots'; - try { console.log(`Uploading to bucket ${bucketName} with key ${key}`); await minioClient.putObject(bucketName, key, data, data.length, { 'Content-Type': 'image/png' }); @@ -52,6 +51,7 @@ class Run extends Model implements RunAttr console.log(`Successfully uploaded to MinIO: minio://${bucketName}/${key}`); } catch (error) { console.error(`Error uploading to MinIO bucket: ${bucketName} with key: ${key}`, error); + throw error; } }