From eaa2b72ec524b21a0e6f3b7a762a407d38e1ddae Mon Sep 17 00:00:00 2001 From: vilarodr Date: Thu, 25 Jul 2024 10:07:45 +0200 Subject: [PATCH] Alert messages --- src/main/controllers/upload-controller.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/controllers/upload-controller.ts b/src/main/controllers/upload-controller.ts index 88b6870..190b4b2 100755 --- a/src/main/controllers/upload-controller.ts +++ b/src/main/controllers/upload-controller.ts @@ -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; @@ -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; @@ -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)); @@ -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 { @@ -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);