From 600b0b5d484c4c6959f2d527a2c77e3faa1f28ef Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Sun, 25 Oct 2026 18:02:15 -0500 Subject: trap and log errors --- src/web/src/components/Transfers/TransferGroup.jsx | 32 ++++++++++++++-------- 1 file changed, 20 insertions(+), 12 deletions(-) (limited to 'src/web') 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) => { -- cgit v1.2.3