 
       return errorResult
 
-    completionHandler = (entity, callback) ->
+    completionHandler = (entity) ->
       entityParser = entityHelper environmentId
 
       responseCallback = callback

      domainBoundOperationHandler = taskDomain.bind operationHandler


      domainBoundOperationHandler task.request, completionHandler, (err, result) ->
        if err?
          return callback(convertToError err)

        callback null, result

  obj =
    collection: collection

      collectionToProcess = collection task.collectionName
      dataOp = ''

      completionHandler = initCompletionHandler task, (err, result) ->
        if err?
          return callback(convertToError err)

        callback null, result

      if task.method is 'POST'
        dataOp = 'onInsert'
