Skip to content

Commit

Permalink
Improve logging for origin errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Inrixia committed Apr 6, 2024
1 parent d2054c3 commit ac013f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/Video.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ export class Video {
await fs.mkdir(this.folderPath, { recursive: true });

const delivery = await this.getDelivery();
if (delivery.origins === undefined) throw new Error("Video has no origins to download from!");
if (delivery?.origins === undefined) throw new Error("Video has no origins to download from!");

// Round robin edges with download enabled
const downloadOrigin = this.getOrigin(delivery.origins);
Expand Down

0 comments on commit ac013f6

Please sign in to comment.