From e3dd43aaac1a7787db183491f9c061e4c05f7fbe Mon Sep 17 00:00:00 2001 From: Ryan Tharp Date: Wed, 10 Feb 2021 17:23:04 -0800 Subject: [PATCH] Replace unused textResponse with used noJson, updating logging --- js/modules/loki_app_dot_net_api.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/modules/loki_app_dot_net_api.js b/js/modules/loki_app_dot_net_api.js index 8b2c5f312..908f4210f 100644 --- a/js/modules/loki_app_dot_net_api.js +++ b/js/modules/loki_app_dot_net_api.js @@ -287,7 +287,7 @@ const serverRequest = async (endpoint, options = {}) => { txtResponse = await result.text(); // cloudflare timeouts (504s) will be html... - response = options.textResponse ? txtResponse : JSON.parse(txtResponse); + response = options.noJson ? txtResponse : JSON.parse(txtResponse); // result.status will always be 200 // emulate the correct http code if available @@ -303,7 +303,7 @@ const serverRequest = async (endpoint, options = {}) => { e.message, `json: ${txtResponse}`, 'attempting connection to', - url + url.toString() ); } else { log.error( @@ -311,7 +311,7 @@ const serverRequest = async (endpoint, options = {}) => { e.code, e.message, 'attempting connection to', - url + url.toString() ); }