diff --git a/app/src/config/HarborConfig.ts b/app/src/config/HarborConfig.ts index b07a43a..d5b5145 100644 --- a/app/src/config/HarborConfig.ts +++ b/app/src/config/HarborConfig.ts @@ -1,5 +1,5 @@ import { remove, writeTextFile } from "@tauri-apps/plugin-fs"; -import { dirname, join } from "@tauri-apps/api/path"; +import { join } from "@tauri-apps/api/path"; import { CURRENT_PROFILE, diff --git a/app/src/useHarbor.tsx b/app/src/useHarbor.tsx index f2edd83..c046a2a 100644 --- a/app/src/useHarbor.tsx +++ b/app/src/useHarbor.tsx @@ -33,7 +33,11 @@ export const useHarborTrigger = (args: string[]) => { const result = await runHarbor(args); setResult(result); } catch (e) { - setError(e); + if (e instanceof Error) { + setError(e); + } else { + setError(new Error(`Unexpected error: ${e}`)); + } } finally { setLoading(false); }