diff options
Diffstat (limited to 'src/web')
| -rw-r--r-- | src/web/src/components/System/Shares/ContentsModal.jsx | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/web/src/components/System/Shares/ContentsModal.jsx b/src/web/src/components/System/Shares/ContentsModal.jsx index 5399bcf2..36d1d79d 100644 --- a/src/web/src/components/System/Shares/ContentsModal.jsx +++ b/src/web/src/components/System/Shares/ContentsModal.jsx @@ -13,7 +13,16 @@ const ContentsModal = ({ onClose, share, theme }) => { const fetch = async () => { setLoading(true); - const result = await browse({ id }); + let result; + + try { + result = await browse({ id }); + } catch (error) { + console.error(error); + setContents(error?.response?.data ?? error?.message ?? String(error)); + setLoading(false); + return; + } const directories = result.map((directory) => { const lines = [directory.name.replace(remotePath, localPath)]; |
