     @beforeSend(req, null, options)
     req.end (err, res) ->
       return callback(err) if err
-      return callback(new Error "Ajax failed with status #{res.status} for #{'destroy'} with: #{JSONUtils.stringify(res.body)}") unless res.ok
+      return callback(_.extend(new Error("Ajax failed with status #{res.status} for #{'resetSchema'}"), {status: res.status})) unless res.ok
       callback()
 
   cursor: (query={}) -> return new HTTPCursor(query, {model_type: @model_type, url: @url, request: @request, sync: @})

    @beforeSend(req, null)
    req.end (err, res) ->
      return callback(err) if err
      return callback(new Error "Ajax failed with status #{res.status} for #{'destroy'} with: #{JSONUtils.stringify(res.body)}") unless res.ok
      callback()

  beforeSend: (req, model, options={}) ->

      sync.beforeSend(req, model, options)
      req.end (err, res) ->
        return options.error(err) if err
        return options.error(_.extend(new Error("Ajax failed with status #{res.status} for #{method}"), {status: res.status})) unless res.ok
        options.success(JSONUtils.parse(res.body))
      return

