diff options
Diffstat (limited to 'lib/promise_request.js')
-rw-r--r-- | lib/promise_request.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/promise_request.js b/lib/promise_request.js index bda4d66..0572ac4 100644 --- a/lib/promise_request.js +++ b/lib/promise_request.js @@ -32,6 +32,10 @@ const querystring = require('querystring'); const logger = require('./logging').getLogger(); exports.doRequest = function(options, body, targetEntity, mainReq) { + + /* Defense: for now, some callers don't provide mainReq */ + mainReq = mainReq || {}; + var opInfo = {"startTime":new Date(), "targetEntity": targetEntity}; return new Promise(function(resolve, reject) { |