diff --git a/ui/desktop/electron-app/src/models/runtime-settings.js b/ui/desktop/electron-app/src/models/runtime-settings.js index fdd91608c..eb821985d 100644 --- a/ui/desktop/electron-app/src/models/runtime-settings.js +++ b/ui/desktop/electron-app/src/models/runtime-settings.js @@ -31,7 +31,12 @@ class RuntimeSettings { // test to see if the origin is API-compatible with the desktop client. const scopesEndpoint = `${origin}/v1/scopes`; try { - await netRequestPromise(scopesEndpoint); + const result = await netRequestPromise(scopesEndpoint); + // Redirects (3xx) are handled in the netRequest Promise, so we only + // throw an error for 4xx or 5xx responses. + if (result.statusCode >= 400) { + throw new Error(); + } } catch (e) { throw new Error(`Origin ${origin} could not be validated.`); }