From 67c413c203f02cedc334fa7db7d9a2c5448c532b Mon Sep 17 00:00:00 2001 From: varnit goyal Date: Sun, 13 Oct 2024 14:32:09 +0530 Subject: [PATCH] TP-5555 | clean up --- service/FetchSourceMapService.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/service/FetchSourceMapService.go b/service/FetchSourceMapService.go index 9bb7a9a..b64628b 100644 --- a/service/FetchSourceMapService.go +++ b/service/FetchSourceMapService.go @@ -43,6 +43,7 @@ func (sm *SourceMapService) downloadFromS3(key string, bucket string, filePath s if err != nil { fmt.Printf("printing key %s and bucket %s from s3 err: %v", key, bucket, filePath) fmt.Printf("Error downloading from S3: %v\n", err) + return err } //defer result.Body.Close() dir := filepath.Dir(filePath) @@ -58,7 +59,7 @@ func (sm *SourceMapService) downloadFromS3(key string, bucket string, filePath s defer file.Close() body, err := io.ReadAll(result.Body) if err != nil { - sm.logger.Info("Couldn't read object body from %v.\n") + sm.logger.Info("Couldn't read object body") } _, err = file.Write(body)