@@ -80,29 +80,33 @@ import {
8080
8181 onMount (async () => {
8282
83+
8384 $userSession = user
8485
8586 const getLFS = async () => {
86- const response = await fetch (' /api/settings/filtered-folder-structure' , {
87- method: ' GET'
88- })
87+ try {
88+ const response = await fetch (' /api/settings/filtered-folder-structure' , {
89+ method: ' GET'
90+ })
8991
90- if (response .ok ) {
91- return (await response .json ()) as TreeViewNode
92- } else {
93- toastStore .trigger (errorToast (response .statusText ))
94- return {} as TreeViewNode
92+ if (response .ok ) {
93+ lfs = (await response .json ()) as TreeViewNode
94+ }
95+
96+ } catch (err ) {
97+ toastStore .trigger (errorToast (' Failed to fetch local file system structure: ' ))
9598 }
9699 }
97100
98- lfs = await getLFS ();
101+ getLFS (). catch (() => { /* ignore error */ })
99102
100103 fileStorage = {
101104 storeFiles: false ,
102105 provider: IO .Dropbox ,
103106 provider_id: ' ' ,
104107 path: ' /upload'
105108 }
109+
106110 inputAliases = hasConnections ($processSettingsStore .input .provider ) ? getCloudProviderAliases ($userSession ?.connections [$processSettingsStore .input .provider .toLowerCase ()]) : new Map ()
107111 outputAliases = hasConnections ($processSettingsStore .output .provider ) ? getCloudProviderAliases ($userSession ?.connections [$processSettingsStore .output .provider .toLowerCase ()]) : new Map ()
108112 fileUploadAliases = hasConnections (fileStorage .provider ) ? getCloudProviderAliases ($userSession ?.connections [fileStorage .provider .toLowerCase ()]) : new Map ()
@@ -118,6 +122,7 @@ import {
118122 goto (` /processes?pipeline_id=${params .get (' pipeline_id' )} ` )
119123 }
120124
125+
121126 $processSettingsStore .pipeline_id =
122127 params .get (' pipeline_id' ) || $processSettingsStore .pipeline_id
123128
@@ -290,7 +295,7 @@ import {
290295 await goto (` /pipelines/${$processSettingsStore .pipeline_id } ` )
291296 }
292297 } else {
293- toastStore .trigger (errorToast (JSON . stringify ( response .body )))
298+ toastStore .trigger (errorToast (( await response .text () )))
294299 starting = false
295300 }
296301
@@ -686,7 +691,7 @@ import {
686691 {/if }
687692 {/if }
688693 {:else if equals ($processSettingsStore .input .provider , IO .LocalDrive ) }
689- {#if Object .keys (lfs ).length > 0 }
694+ {#if lfs && Object .keys (lfs ).length > 0 }
690695 <FolderStructure
691696 tree ={lfs }
692697 label =" Folder Picker"
0 commit comments