Skip to content

Commit 964cfa7

Browse files
1 parent 90d2906 commit 964cfa7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tools/spectral/ipa/metrics/metricS3Upload.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ export async function uploadMetricCollectionDataToS3(filePath = config.defaultMe
1616
throw new Error('Loaded metrics collection data is empty');
1717
}
1818

19+
const table = tableFromJSON(metricsCollectionData);
20+
if (table === undefined) {
21+
throw new Error('Unable to transform metrics collection data to table');
22+
}
23+
1924
try {
2025
console.log('Creating S3 Client...');
2126
const client = getS3Client();
@@ -24,7 +29,6 @@ export async function uploadMetricCollectionDataToS3(filePath = config.defaultMe
2429
console.log('Getting S3 file path...');
2530
const s3fileProps = getS3FilePath();
2631

27-
const table = tableFromJSON(metricsCollectionData);
2832
const command = new PutObjectCommand({
2933
Bucket: s3fileProps.bucketName,
3034
Key: path.join(s3fileProps.key, formattedDate, 'metric-collection-results.parquet'),

0 commit comments

Comments
 (0)