禁用Drupal 7默认的ajax错误弹窗

(function ($) {
    Drupal.behaviors.global = {
        attach: function (context, settings) {
            // This overwrites the  ajax error handler.
            $.ajaxSetup({
                beforeSend: function(jqXHR, settings) {
                   settings.error = function(jqXHR, textStatus, errorThrown) {};
                }
            });
        }
    };
})(jQuery);