title: ajax error return - not returning variable
body: <p>I am new to ajax so hopefully this is a simple oversight.</p>
  
  <p>I have the following code for upvotes, based off the django updown app</p>
  
  <pre><code>$(document).ready(function() {
     $("#custom-post-up").submit(function(event){
          event.preventDefault();
          $form=$('#custom-post-up');
          var datastring = $form.serialize();
          $.ajax({
              type: "POST",
              url: $form.attr('action'),
              dataType: 'html',
              data: datastring,
              success: function(result)
              {
                  $('#custom-post-message').html(result);
                  $('#custom-post-rating').load('/post/{{ id }}/rating/');
              },
              error: function(result)
              {
                  $('#custom-post-message').html(result);
              }
          });
          return false;
     });
  });
  </code></pre>
  
  <p>The problem - the error message doesn't get produced. if I put in a string instead, it works fine.
  eg:</p>
  
  <pre><code>error: function(result)
              {
                  $('#custom-post-message').html("error");
              }
  </code></pre>
  
  <p>Also, the success message works fine too.</p>
  
  <p>The error message I am trying to get is from the view in the updown app:</p>
  
  <pre><code>def authentication_required_response(self, request, context):
      response = HttpResponse('You must be logged in to vote.')
      response.status_code = 403
      return response
  </code></pre>
  
  <p>The success message from this view works fine:</p>
  
  <pre><code>def rating_changed_response(self, request, context):
      response = HttpResponse('Vote changed.')
      return response
  </code></pre>
  
  <p>Thanks!</p>