Skip to content

Commit bbd968d

Browse files
committed
debug: log downloaded data if torrent file validation fails
1 parent 062a5ca commit bbd968d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/util/download.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ function validateTorrentData(response: Response, data: string): void {
5050
} else {
5151
contentType = "unknown"
5252
}
53+
54+
console.error("Invalid torrent data received:", data);
55+
5356
throw new Error("Received " + contentType + " content instead of a .torrent file");
5457
}
5558
}

0 commit comments

Comments
 (0)