 #####################################
 
 rerunHttpRequestSend = (options, transaction, callback) ->
-  response = {}
-  response.transaction = {}
+
+  if options == null || options == ''
+    err = "An empty options object was supplied. Aborting HTTP send request"
+    return callback err, null
+
+  if transaction == null
+    err = "An empty Transaction object was supplied. Aborting HTTP Send Request"
+    return callback err, null
+
+  response = 
+    transaction: {}
 
   logger.info('Rerun Transaction #' + transaction._id + ' - HTTP Request is being sent...')
   req = http.request options, (res) ->

rerunUpdateTaskObject = (taskID, transactionID, response, callback) ->

  # decrement the remainingTransactions property
  TasksModel.update 
    _id: taskID
  , $inc:
    remainingTransactions: -1

        if task.remainingTransactions == 0
          logger.info('Rerun Task #' + taskID + ' - Completed successfully')

      callback null, task

###############################################################
# Function for updating the task object with response details #
