From 0b6849c96a7a4fe97f3203edfeb14f342267ec1c Mon Sep 17 00:00:00 2001 From: Beaudan Date: Wed, 13 Mar 2019 16:41:13 +1100 Subject: [PATCH] Review comment plus added a todo --- js/modules/loki_snode_api.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/modules/loki_snode_api.js b/js/modules/loki_snode_api.js index e24be4426..0f83e7cc3 100644 --- a/js/modules/loki_snode_api.js +++ b/js/modules/loki_snode_api.js @@ -232,7 +232,9 @@ class LokiSnodeAPI { result = await response.text(); } - if (response.status !== 200 || !result.nodes || result.nodes === []) { + // TODO: Handle wrong swarm error from snode + + if (!response.ok || !result.nodes || result.nodes === []) { throw new window.textsecure.EmptySwarmError( pubKey, 'Could not retrieve swarm nodes'