code: function htmlError(result, cb) {
    var message = result.body
      .match(/<h1>Error<\/h1>.+<\/p>/).toString()
      .replace(/<h1>Error<\/h1>/, '')
      .replace(/<\/?p>/g, '');
    cb(new Error(message));
  }
docs: Parse HTML error page from Jenkins, pass the error message to the callback.
  This error is usually the response body of error 400.
  
  @param {Object} result: result of the sent request
  @param {Function} cb: standard cb(err, result) callback