diff options
| author | OpeOginni <[email protected]> | 2026-02-24 15:48:59 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-02-24 14:48:59 +0000 |
| commit | cc02476ea5e02d3c827006dcd0c830f7673556e5 (patch) | |
| tree | fe5a89e39d66351ee00f20df86fe6dffbae40cef /packages/app/src/context/global-sync | |
| parent | 5190589632c97b570bb6f9035aa5c80c0fe833e7 (diff) | |
| download | opencode-cc02476ea5e02d3c827006dcd0c830f7673556e5.tar.gz opencode-cc02476ea5e02d3c827006dcd0c830f7673556e5.zip | |
refactor: replace error handling with serverErrorMessage utility and checks for if error is ConfigInvalidError (#14685)
Diffstat (limited to 'packages/app/src/context/global-sync')
| -rw-r--r-- | packages/app/src/context/global-sync/bootstrap.ts | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/packages/app/src/context/global-sync/bootstrap.ts b/packages/app/src/context/global-sync/bootstrap.ts index 6e7714828..b35f1cd80 100644 --- a/packages/app/src/context/global-sync/bootstrap.ts +++ b/packages/app/src/context/global-sync/bootstrap.ts @@ -16,6 +16,7 @@ import { batch } from "solid-js" import { reconcile, type SetStoreFunction, type Store } from "solid-js/store" import type { State, VcsCache } from "./types" import { cmp, normalizeProviderList } from "./utils" +import { formatServerError } from "@/utils/server-errors" type GlobalStore = { ready: boolean @@ -133,8 +134,11 @@ export async function bootstrapDirectory(input: { } catch (err) { console.error("Failed to bootstrap instance", err) const project = getFilename(input.directory) - const message = err instanceof Error ? err.message : String(err) - showToast({ title: `Failed to reload ${project}`, description: message }) + showToast({ + variant: "error", + title: `Failed to reload ${project}`, + description: formatServerError(err) + }) input.setStore("status", "partial") return } |
