title: Ajax.BeginForm OnFailure invoked with Response, not AjaxContext
body: <p>When writing Ajax data entry forms in my ASP.NET MVC3 app, I have a standard Ajax error handler, along the lines of:</p>
  
  <pre><code>function handleAjaxError(ajaxContext) {
       var response = ajaxContext.get_response();
       var statusCode = response.get_statusCode();
       alert("Request failed, status code " + statusCode);
  }
  </code></pre>
  
  <p>I'm now finding that the parameter sent to handleAjaxError isn't an Ajax context but the Response object itself, for some reason.</p>
  
  <p>Is this a known behavior change in MVC3, maybe? Here's the form setup, if that's relevant:</p>
  
  <pre><code>@using (Ajax.BeginForm("Create", "Attendance", null, new AjaxOptions
       {   OnFailure = "handleAjaxError",
           OnSuccess = "alert('success')" },  
  new  { id = "frmCreateException" }))
  {
      @Html.EditorFor(m =&gt; Model)
  }
  </code></pre>
  
  <p>The controller action returns a PartialViewResult. The HTTP Exception at the moment is a 500, because I haven't yet created the view.</p>
  
  <p>Thanks!</p>