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. "{}").
Written by robertjlooby
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Backbone
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#