We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cca74c8 commit f6f0a33Copy full SHA for f6f0a33
1 file changed
apps/app/src/lib/file_tree/builder.ts
@@ -1,5 +1,6 @@
1
import { type FileNode, type GenericPath } from '@/types';
2
import { invoke } from '@tauri-apps/api/core';
3
+import { toast } from 'svelte-sonner';
4
5
export async function build_file_tree_from_fs({
6
path,
@@ -12,6 +13,13 @@ export async function build_file_tree_from_fs({
12
13
});
14
} catch (error) {
15
console.error('Failed to build file tree:', error);
16
+ const description =
17
+ error instanceof Error
18
+ ? error.message
19
+ : typeof error === 'string'
20
+ ? error
21
+ : JSON.stringify(error);
22
+ toast.error('Failed to build file tree', { description });
23
throw error;
24
}
25
0 commit comments