     dataType: "json",
     url: url,
     data: ({"taxon[parent_id]": new_parent.prop("id"), "taxon[child_index]": position }),
-    error: handle_ajax_error
+    error: tree_error_handler(data)
 
   true
 
 handle_create = (e, data) ->
-  last_rollback = data.rlbk
   node = data.rslt.obj
   name = data.rslt.name
   position = data.rslt.position

last_rollback = null
base_url = null

handle_ajax_error = (XMLHttpRequest, textStatus, errorThrown) ->
  $.jstree.rollback(last_rollback)
  $("#ajax_error").show().html("<strong>" + server_error + "</strong><br />" + taxonomy_tree_error)

handle_move = (e, data) ->
  last_rollback = data.rlbk
  position = data.rslt.cp
  node = data.rslt.o
  new_parent = data.rslt.np

    data: {
      "taxon[name]": name,
    },
    error: tree_error_handler(data)

handle_delete = (e, data) ->
  node = data.rslt.obj
  delete_url = "#{base_url}/#{node.prop("id")}"
  if confirm(Spree.translations.are_you_sure_delete)
