summaryrefslogtreecommitdiffhomepage
path: root/packages/desktop/src/context
diff options
context:
space:
mode:
Diffstat (limited to 'packages/desktop/src/context')
-rw-r--r--packages/desktop/src/context/global-sync.tsx9
1 files changed, 9 insertions, 0 deletions
diff --git a/packages/desktop/src/context/global-sync.tsx b/packages/desktop/src/context/global-sync.tsx
index 27a89e7bc..ae40555d6 100644
--- a/packages/desktop/src/context/global-sync.tsx
+++ b/packages/desktop/src/context/global-sync.tsx
@@ -295,6 +295,15 @@ function createGlobalSync() {
})
async function bootstrap() {
+ const health = await globalSDK.client.global.health().then((x) => x.data)
+ if (!health?.healthy) {
+ setGlobalStore(
+ "error",
+ new Error(`Could not connect to server. Is there a server running at \`${globalSDK.url}\`?`),
+ )
+ return
+ }
+
return Promise.all([
retry(() =>
globalSDK.client.path.get().then((x) => {