Skip to content

Commit

Permalink
Alert messages
Browse files Browse the repository at this point in the history
  • Loading branch information
vilarodr committed Jul 25, 2024
1 parent 904138a commit eaa2b72
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main/controllers/upload-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const filesTransfer = (event: IpcMainEvent, persistentId: string, items:
}
} catch (err) {
const title = `Error uploading file ${itemInfo.name} to store.`
alert(title, err);
alert(title, err.message);
event.sender.send('actionFor' + itemInfo.id.toString(), 'fail', 0);
itemsFailed++;
continue;
Expand Down Expand Up @@ -83,7 +83,7 @@ export const filesTransfer = (event: IpcMainEvent, persistentId: string, items:
}
} catch (err) {
const title = `Error uploading file ${itemInfo.name} to store.`
alert(title, err);
alert(title, err.message);
event.sender.send('actionFor' + itemInfo.id.toString(), 'fail', 0);
itemsFailed++;
continue;
Expand All @@ -103,7 +103,7 @@ export const filesTransfer = (event: IpcMainEvent, persistentId: string, items:
}
} catch (err) {
const title = `Error uploading part of file ${itemInfo.name} to store.`
alert(title, err);
alert(title, err.message);
throw new Error(title + '\n' + err);
}
const responseHeaders = JSON.parse(JSON.stringify(uploadToStoreResponse.headers));
Expand All @@ -124,7 +124,7 @@ export const filesTransfer = (event: IpcMainEvent, persistentId: string, items:
};
} catch (err) {
const title = 'Error aborting multipart upload.';
alert(title, err);
alert(title, err.message);
throw new Error(title + '\n' + err);
}
} else {
Expand All @@ -135,7 +135,7 @@ export const filesTransfer = (event: IpcMainEvent, persistentId: string, items:
}
} catch (err) {
const title = 'Error completing multipart upload to store.';
alert(title, err);
alert(title, err.message);
throw new Error(title + '\n' + err);
}
itemInfo.etag = await calcChecksum(itemInfo);
Expand Down

0 comments on commit eaa2b72

Please sign in to comment.