code: function (err) {
  		var storage = getStorage();
  		if (storage && storage.errors) {
  			storage.errors.push(err);
  			return localStorage.setItem([config.nameSpace], JSON.stringify(storage));
  		}
  	}
docs: JSON.stringify the object and put back in localStorage