aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2026-10-25 18:02:15 -0500
committerJP Dillingham <jp@dillingham.me>2026-10-25 18:02:15 -0500
commit600b0b5d484c4c6959f2d527a2c77e3faa1f28ef (patch)
treebc4e0dbbcaa090fa0610793c78658cf4052a56e6 /src
parent8bf64a6319040a7e4002a4d27ce4f21f17d7da2f (diff)
downloadslskd-600b0b5d484c4c6959f2d527a2c77e3faa1f28ef.tar.gz
trap and log errors
Diffstat (limited to 'src')
-rw-r--r--src/web/src/components/Transfers/TransferGroup.jsx32
1 files changed, 20 insertions, 12 deletions
diff --git a/src/web/src/components/Transfers/TransferGroup.jsx b/src/web/src/components/Transfers/TransferGroup.jsx
index ea4fba04..f150459a 100644
--- a/src/web/src/components/Transfers/TransferGroup.jsx
+++ b/src/web/src/components/Transfers/TransferGroup.jsx
@@ -65,21 +65,29 @@ class TransferGroup extends Component {
};
cancelAll = async (direction, username, selected) => {
- await Promise.all(
- selected.map((file) =>
- transfers.cancel({ direction, id: file.id, username }),
- ),
- );
+ try {
+ await Promise.all(
+ selected.map((file) =>
+ transfers.cancel({ direction, id: file.id, username }),
+ ),
+ );
+ } catch (error) {
+ console.error(error);
+ }
};
removeAll = async (direction, username, selected) => {
- await Promise.all(
- selected.map((file) =>
- transfers
- .cancel({ direction, id: file.id, remove: true, username })
- .then(() => this.removeFileSelection(file)),
- ),
- );
+ try {
+ await Promise.all(
+ selected.map((file) =>
+ transfers
+ .cancel({ direction, id: file.id, remove: true, username })
+ .then(() => this.removeFileSelection(file)),
+ ),
+ );
+ } catch (error) {
+ console.error(error);
+ }
};
handleRetry = async (file) => {