title: Ajax call always return success
body: <p>I have an ajax call to my controller, which in turn calls a service which returns true or false. I cannot seem to figure out why this always triggers my success function when it returns from controller to view.</p>
  
  <p><strong>Controller</strong></p>
  
  <pre><code>[HttpGet]
  public JsonResult TagUnit(int id, string selectedItem)
  {
      try
      {
          var result = UnitClient.TagUnit(id, selectedItem);
          if (!result)
          {
              throw new InvalidOperationException();
          }
          return Json(new {success = true}, JsonRequestBehavior.AllowGet);
      }
      catch (Exception e)
      {
          return Json(new {success = false}, JsonRequestBehavior.AllowGet);
      }
  }
  </code></pre>
  
  <p><strong>Cshtml - Javascript - Ajax</strong></p>
  
  <pre><code> .on("select2-selecting", function (e) {
              var url = '@Url.Content("~/UnitDetails/TagUnit/" + Model.ViewUnitContract.Id)';
              var id = e.val;
              var tagName = e.object.text;
              console.log(id + " : " + tagName);
  
              $.ajax({
                  url: url,
                  data: { selectedItem: tagName },
                  type: 'GET',
                  dataType: 'json',
                  success: function () {
                      alert('Success');
                  },
                  error: function () {
                      alert('Error');
                  }
              });
          }).select2('val', ['1', '2']);
  </code></pre>
  
  <p>What am I missing here?</p>