collection.create(data, {
success:function(){ ... },
error: function(){ ... },
});
If I save it, and it hits the server, but the server validates an error, how do I let the client know? It seems that no matter what, “success” is called.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The error callback is triggered on a 4xx or 5xx HTTP response.
What are the HTTP response codes of your server errors?
The latest Backbone docs have a small blurb about this: