The trunk retains an error when an error 200 occurs

so there’s nothing special about it (which really annoys me). im pretty sure that there is something that they are missing.

so here is some code that is relative:

    _me.attributes.answers.push(oAnswer);
    _me.save(null,{
        success : function(){
            console.log('saved the answer');
            q = new q.Questions() ;
            q.fetch({
                success : function(data){
                    console.log('reloading the template with this data');
                    console.log(data)
                    this.render({model:data , el:this.$el})
                }
            })
        },
        error : function(model , response , x){
            console.log('error')
            console.log(response)
            console.log(x)
        }
    });

Now I can see on my console that the request is made (PUT)and that the server response 200 (OK).

but I still get errorin the log when I tried to log the answer, I got this

readyState
    4

responseText
    "OK"

status
    200

statusText
    "OK"

still the spine just starts the handler errorfor _me.save, why is this?

+4
source share
1 answer

. "parse: false"

model.save(attrs, {
  success: function() { ... },
  parse  : false
});
+1

All Articles