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)