       async: false
       success: (data, textStatus, xhr) ->
         xhr.status
-      error: (data, textStatus, xhr) =>
-        @error = data.status
+      error: (xhr) =>
+        @error = xhr.status
     ).responseText
 
     obj = JSON.parse(response)


  @set_template: (template) ->
    @template = template

  # The attribute setter publish changes using the DataBinder PubSub
  set: (attr_name, val) ->

    @uuid = @opts.uuid || @attributes.uuid || App.UUID.generate()
    @id = @opts.id || @attributes.id

    @attributes["uuid"] = @uuid

    if template?
      @template = template.replace(/\b(data-k-uuid)\.?[^\s|>]+/g, "data-k-uuid=" + @uuid)
      @template = @template.replace(/\b(data-id)\.?[^\s|>]+/g, "data-id=" + @id)
