jashkenas / backbone

Give your JS App some Backbone with Models, Views, Collections, and Events
http://backbonejs.org
MIT License
28.09k stars 5.38k forks source link

Non 200 status code not catching error handler on saving model #2919

Closed khanhth closed 10 years ago

khanhth commented 10 years ago

Regarding the document: http://backbonejs.org/#Model-save. I sent a 201 (or 202, 203) status respond code from server, however, error handler didn't get fired.

tgriesser commented 10 years ago

The non-200 status code in the docs refers to a status code that isn't a 200-level code. 2xx's are generally considered success codes, you'd want a 4xx or 5xx to trigger the error.