From 47be2159e6a20e5563e0c2581edf73380933b403 Mon Sep 17 00:00:00 2001 From: omenocal Date: Fri, 15 Feb 2019 09:49:15 -0600 Subject: [PATCH] Return google logging promises --- src/dashbot-google.js | 4 ++-- src/make-request.js | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/dashbot-google.js b/src/dashbot-google.js index 40b42a7..ee50437 100644 --- a/src/dashbot-google.js +++ b/src/dashbot-google.js @@ -114,7 +114,7 @@ function DashBotGoogle(apiKey, urlRoot, debug, printErrors, config) { if (intent) { data.intent = intent } - internalLogIncoming(data, 'npm'); + return internalLogIncoming(data, 'npm'); }; that.logOutgoing = function(requestBody, message, metadata) { @@ -127,7 +127,7 @@ function DashBotGoogle(apiKey, urlRoot, debug, printErrors, config) { if (metadata) { data.metadata = metadata } - internalLogOutgoing(data, 'npm'); + return internalLogOutgoing(data, 'npm'); }; return that; diff --git a/src/make-request.js b/src/make-request.js index dd20c66..b328e27 100644 --- a/src/make-request.js +++ b/src/make-request.js @@ -27,9 +27,9 @@ module.exports = function (data, printErrors, redact, timeout = 15000) { } return response }) - } else { - p.catch(function(err) { - // ignore - }); } + + return p.catch(function(err) { + // ignore + }) }