           msg.reply "Jenkins says: #{err}"
         else if 200 <= res.statusCode < 400 # Or, not an error code.
           msg.reply "(#{res.statusCode}) Build started for #{job} #{url}/job/#{job}"
+        else if 400 == res.statusCode
+          jenkinsBuild(msg, true)
         else
           msg.reply "Jenkins says: Status #{res.statusCode} #{body}"
 

              # Add the job to the jobList
              index = jobList.indexOf(job.name)
              if index == -1
                jobList.push(job.name) 
                index = jobList.indexOf(job.name)

              state = if job.color == "red" then "FAIL" else "PASS"


module.exports = (robot) ->
  robot.respond /j(?:enkins)? build ([\w\.\-_ ]+)(, (.+))?/i, (msg) ->
    jenkinsBuild(msg, false)

  robot.respond /j(?:enkins)? b (\d+)/i, (msg) ->
    jenkinsBuildById(msg)
