title: MVC jQuery ajax GET returns success even on error
body: <p>My project have an ajax get function:</p>
  
  <pre><code>$('#DetailMaxGuest').change(function () {
          var result = $('#DetailMaxGuest').val();
          var resultparse = parseInt(result);
          var resultid = $('#resultid').val();
          $('#DetailMaxGuest option:selected').val(result).attr('selected', 'selected');
          var message = {'resultid':resultid, 'data':resultparse};
          $.ajax({
              type: 'GET',
              url: '/Product/GetMaxGuest',
              data: message,
              success: function (data, success) {
                  $('#reservation-result').html(success).fadeIn(2000);
              },
              error: function (data, error) {
                  $('#reservation-result').html(error).fadeIn(2000);
  
              }
          });
  
      });
  </code></pre>
  
  <p>and My controller;</p>
  
  <pre><code>public JsonResult GetMaxGuest(int? data,Guid? resultid)
          {
              var appid =resultid;
              System.Threading.Thread.Sleep(500);
              var firstOrDefault = _bb.Aparts.FirstOrDefault(m =&gt; m.ApartID == appid);
              if (firstOrDefault != null)
              {
                  var maxguest = firstOrDefault.ApartMaxGuest;
                  if (data &gt; maxguest)
                  {
                      return Json(new { error=true, msg="Basarisiz" },JsonRequestBehavior.AllowGet);
  
                  }
                  if (data &lt;= maxguest)
                  {
                      return Json(new { success = true, msg = "Basarili" },JsonRequestBehavior.AllowGet);
  
                  }
              }
              return Json(new { error = true, msg = "Basarisiz" }, JsonRequestBehavior.AllowGet);
  
          }
  </code></pre>
  
  <p>and begin transmission return error:</p>
  
  <pre><code>{"error":true,"msg":"Basarisiz"}
  </code></pre>
  
  <p>but on my page writes <code>success</code>. Why don't I see error message?</p>