Last Updated: February 25, 2016
· robertjlooby

BackboneJS save calling error handler on success

If you call save on a Backbone model and receive a 200 OK response, but the error handler is still being called, look at the response body.

If the body is not valid JSON (ex. the body is "") then the error handler will still be called even though the status is a success.

Either replace the save call with a regular $.ajax or return valid JSON (ex. "{}").