make sure sendToProxy get the textResponse option from submit_challenge, improve logging

pull/825/head
Ryan Tharp 6 years ago
parent d9bd481366
commit 9a31e3703c

@ -357,7 +357,8 @@ class LokiAppDotNetServerAPI {
const endpoint = urlStr.replace(`${this.baseServerUrl}/`, ''); const endpoint = urlStr.replace(`${this.baseServerUrl}/`, '');
const { response, result } = await this._sendToProxy( const { response, result } = await this._sendToProxy(
endpoint, endpoint,
finalOptions finalOptions,
options
); );
// emulate nodeFetch response... // emulate nodeFetch response...
return { return {
@ -486,7 +487,7 @@ class LokiAppDotNetServerAPI {
try { try {
response = options.textResponse ? respStr : JSON.parse(respStr); response = options.textResponse ? respStr : JSON.parse(respStr);
} catch (e) { } catch (e) {
log.warn(`_sendToProxy Could not parse inner JSON [${respStr}]`); log.warn(`_sendToProxy Could not parse inner JSON [${respStr}]`, endpoint);
} }
} else { } else {
log.warn( log.warn(

Loading…
Cancel
Save