Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

wrap

Manav Rathi8920462b54e2
diff --git a/web/packages/gallery/services/download.ts b/web/packages/gallery/services/download.ts
index 03d6c0fa71..b36a06cc51 100644
--- a/web/packages/gallery/services/download.ts
+++ b/web/packages/gallery/services/download.ts
@@ -393,7 +393,9 @@ class DownloadManager {
file.metadata.fileType === FileType.image ||
file.metadata.fileType === FileType.livePhoto
) {
- const encryptedData = new Uint8Array(await res.arrayBuffer());
+ const encryptedData = new Uint8Array(
+ await wrapErrors(() => res.arrayBuffer()),
+ );
const decrypted = await decryptStreamBytes(
{
@@ -433,7 +435,9 @@ class DownloadManager {
do {
// done is a boolean and value is an Uint8Array. When done
// is true value will be empty.
- const { done, value } = await reader.read();
+ const { done, value } = await wrapErrors(() =>
+ reader.read(),
+ );
let data: Uint8Array;
if (done) {