From 2cc49a8c341e666de7b8cdd22872b668cb1d380c Mon Sep 17 00:00:00 2001 From: Matiss Janis Aboltins Date: Tue, 5 Sep 2023 19:14:19 +0100 Subject: [PATCH] :bug: (signup) fix setting up for the first time with missing protocol --- packages/loot-core/src/server/main.ts | 8 ++++++-- packages/loot-core/src/server/server-config.ts | 3 +-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/loot-core/src/server/main.ts b/packages/loot-core/src/server/main.ts index d76af67ee11..ac739846511 100644 --- a/packages/loot-core/src/server/main.ts +++ b/packages/loot-core/src/server/main.ts @@ -1628,8 +1628,12 @@ handlers['get-did-bootstrap'] = async function () { handlers['subscribe-needs-bootstrap'] = async function ({ url, }: { url? } = {}) { - if (!getServer(url)) { - return { bootstrapped: true, hasServer: false }; + try { + if (!getServer(url)) { + return { bootstrapped: true, hasServer: false }; + } + } catch (err) { + return { error: 'get-server-failure' }; } let res; diff --git a/packages/loot-core/src/server/server-config.ts b/packages/loot-core/src/server/server-config.ts index 623cced37c4..ab0e72096dc 100644 --- a/packages/loot-core/src/server/server-config.ts +++ b/packages/loot-core/src/server/server-config.ts @@ -32,8 +32,7 @@ export function getServer(url?: string): ServerConfig | null { SYNC_SERVER: joinURL(url, '/sync'), SIGNUP_SERVER: joinURL(url, '/account'), PLAID_SERVER: joinURL(url, '/plaid'), - // TODO: change to use `/gocardless` after v23.8.0 - GOCARDLESS_SERVER: joinURL(url, '/nordigen'), + GOCARDLESS_SERVER: joinURL(url, '/gocardless'), }; } return config;