       host: @destinationElasticsearchUrl
       pathname: "/flow_start_history/event/#{deployment.deploymentUuid}"
 
-    request.put uri, json: deployment, callback
+    request.put uri, json: deployment, (error, response, body) =>
+      return callback error if error?
+      return callback new Error(JSON.stringify body) if response.statusCode >= 300
+      callback null
 
   search: (body, callback=->) =>
     @sourceElasticsearch.search({

    _.map deployments, (deployment) =>
      {beginTime, endTime} = deployment

      _.extend {}, deployment, {
        elapsedTime: endTime - beginTime
        success: endTime?
      }


      deployments = @process @normalize result
      async.each deployments, @update, (error) =>
        throw error if error?
        process.exit 0

  update: (deployment, callback) =>
