From 9e3e338a3fc904896ad630f8064745645508d1d4 Mon Sep 17 00:00:00 2001 From: Jeffrey Goldberg Date: Mon, 13 Feb 2017 15:56:41 -0500 Subject: [PATCH] resolving issue in reload method for GMS related to qrs-interact Post bug --- lib/reloadmetrics.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/reloadmetrics.js b/lib/reloadmetrics.js index 35e7113..f8e9c55 100644 --- a/lib/reloadmetrics.js +++ b/lib/reloadmetrics.js @@ -17,7 +17,7 @@ var reloadMetrics = { var path = "/task/start/synchronous"; path += "?name=" + taskName; logger.debug('reloadMetrics::PATH::' + path, { module: 'reloadmetrics' }); - return qrsInteract.Post(path) + return qrsInteract.Post(path, '', 'json') .then(function(result) { var taskId = result.body.value; if (typeof result.body == 'object') { @@ -26,7 +26,7 @@ var reloadMetrics = { //now that we are done, let's evaluate the result if (error) { logger.error('reloadMetrics::progressCheck::' + error, { module: 'reloadmetrics' }); - reject(new Error(error)); + reject(error); } else { logger.info('reloadMetrics::Task Complete::' + taskName, { module: 'reloadmetrics' }); var path2 = "/executionresult"; @@ -53,17 +53,17 @@ var reloadMetrics = { }) .catch(function(error) { logger.error('reloadMetrics::Task Failure::' + error, { module: 'reloadmetrics' }); - reject(new Error(error)); + reject(error); }); } }); } else { logger.error('reloadMetrics::' + JSON.stringify(result.body), { module: 'reloadmetrics' }); - reject(new Error(result)); + reject(result); } }) .catch(function(error) { - reject(new Error(error)); + reject(error); }); }) .catch(function(error) {