Set AJAX error handler.