Skip to content

Commit

Permalink
add error callback
Browse files Browse the repository at this point in the history
  • Loading branch information
lerouxb committed Dec 18, 2024
1 parent 17f4152 commit 47e2816
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions packages/compass-e2e-tests/smoke-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -307,9 +307,13 @@ async function downloadFile(url: string, targetFile: string): Promise<void> {
}

// save the file to disk
const fileWriter = createWriteStream(targetFile).on('finish', () => {
resolve();
});
const fileWriter = createWriteStream(targetFile)
.on('finish', () => {
resolve();
})
.on('error', (error: any) => {
reject(error);
});

response.pipe(fileWriter);
})
Expand Down

0 comments on commit 47e2816

Please sign in to comment.