/*jslint node:true*/
var request = require('request');
var config = require('../utils/config');

module.exports = function (data) {
  request.post({
    url: config.tcBuildUrl,
    body: data,
    json: true,
    'auth': {
      'user': config.tcUser,
      'pass': config.tcPassword,
      'sendImmediately': true
    }
  }, function (error, response, body) {
    if (error) {
      console.log(error);
    }
  });
};

@@ -371,35 +371,297 @@
 rror
-) %7B%0A      console.log(error
+ %7C%7C response.statusCode != 200) %7B%0A      console.log('StatusCode: ' + response.statusCode);%0A      console.log('Error: ' + error);%0A      console.log('Body: ' + body);%0A    %7D%0A    else %7B%0A      console.log('Successfully queued build ' + data.buildTypeId%0A        + ' on branch ' + data.branchName
 );%0A 

Improve logs on the build post.