- .fail( function( xhr ) {
- var obj;
- try {
- obj = can.parseJSON( xhr.responseText );
- } catch ( err ) {
- obj = {};
- }
- })
-
(If this is not a one-off, then you'll want to use some kind of base model that uses makeFindAll and its kin to set this up in a generic fashion. Have a look at the Caching data in local storage recipe to see how you should leverage these.)