jQuery の $.ajax メソッドの引数や、success, error, complete などに指定する引数をよく忘れてしまうのでメモ。
$.ajax({
  url: 'http://api.example.com/v1/posts',
  type: 'POST',
  dataType: 'HTML',
  data: {
    id: '123'
  },
  success: function(data, statusText, xhr){
    if (xhr.status === 200) {
      // 成功時の処理
    } else if (xhr.status === 302) {
      // HTTPステータスコードによって、処理を分岐
      // 302 でリダイレクトさせたり
      location.href = 'http://example.com/redirect';
    }
  },
  error: function(xhr, statusText, error) {
    // エラー処理
  },
  complete: function(xhr, statusText){
    // 共通処理
  }
});
success, error, complete が .done, .fail, .always に変更されているようです。
これについては、いつか更新します。
・jQuery モダンAjaxな書き方を目指して 〜Deferredを使ったAJAX〜 - Hack Your Design!