Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 2.4.0
## Changes
- [Handling fromPath errors in SetResponse constructor](https://github.com/Netflix/falcor/pull/989)

# 2.3.2
## Bugfix
- [Handling fromPath errors in SetResponse constructor](https://github.com/Netflix/falcor/pull/989)
Expand Down
41 changes: 22 additions & 19 deletions dist/falcor.all.js
Original file line number Diff line number Diff line change
Expand Up @@ -1104,9 +1104,12 @@ var applyErrorPrototype = require(15);
* Does not allow null in path
*
* @private
* @param {Object} [options] - Optional object containing additional error information
* @param {Array} [options.requestedPath] - The path that was being processed when the error occurred
*/
function NullInPathError() {
var instance = new Error("`null` and `undefined` are not allowed in branch key positions");
function NullInPathError(options) {
var requestedPathString = options && options.requestedPath && options.requestedPath.join ? options.requestedPath.join(", ") : "";
var instance = new Error("`null` and `undefined` are not allowed in branch key positions for requested path: " + requestedPathString);

instance.name = "NullInPathError";

Expand Down Expand Up @@ -3775,7 +3778,7 @@ InvalidateResponse.prototype._subscribe = function _subscribe(observer) {
module.exports = InvalidateResponse;

},{"52":52,"88":88,"91":91}],52:[function(require,module,exports){
(function (Promise){
(function (Promise){(function (){
var ModelResponseObserver = require(53);
var $$observable = require(310).default;
var toEsObservable = require(108);
Expand Down Expand Up @@ -3927,7 +3930,7 @@ ModelResponse.prototype.then = function then(onNext, onError) {

module.exports = ModelResponse;

}).call(this,typeof Promise === "function" ? Promise : require(302))
}).call(this)}).call(this,typeof Promise === "function" ? Promise : require(302))
},{"108":108,"302":302,"310":310,"53":53}],53:[function(require,module,exports){
var noop = require(95);

Expand Down Expand Up @@ -4925,7 +4928,7 @@ function setNode(

if (key == null) {
if (branch) {
throw new NullInPathError();
throw new NullInPathError({ requestedPath: requestedPath });
} else if (node) {
key = node.$_key;
}
Expand Down Expand Up @@ -5156,7 +5159,7 @@ function setNode(

if (key == null) {
if (branch) {
throw new NullInPathError();
throw new NullInPathError({ requestedPath: requestedPath });
} else if (node) {
key = node.$_key;
}
Expand Down Expand Up @@ -5396,7 +5399,7 @@ function setNode(

if (key == null) {
if (branch) {
throw new NullInPathError();
throw new NullInPathError({ requestedPath: requestedPath });
} else if (node) {
key = node.$_key;
}
Expand Down Expand Up @@ -6480,7 +6483,7 @@ RawTask.prototype.call = function () {
};

},{"115":115}],115:[function(require,module,exports){
(function (global){
(function (global){(function (){
"use strict";

// Use the fastest means possible to execute a task in its own turn, with
Expand Down Expand Up @@ -6705,7 +6708,7 @@ rawAsap.makeRequestCallFromTimer = makeRequestCallFromTimer;
// back into ASAP proper.
// https://github.com/tildeio/rsvp.js/blob/cddf7232546a9cf858524b75cde6f9edf72620a7/lib/rsvp/asap.js

}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{}],116:[function(require,module,exports){
'use strict';
var request = require(120);
Expand Down Expand Up @@ -6837,7 +6840,7 @@ module.exports = function buildQueryObject(url, method, queryData) {
};

},{}],118:[function(require,module,exports){
(function (global){
(function (global){(function (){
'use strict';
// Get CORS support even for older IE
module.exports = function getCORSRequest() {
Expand All @@ -6851,9 +6854,9 @@ module.exports = function getCORSRequest() {
}
};

}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{}],119:[function(require,module,exports){
(function (global){
(function (global){(function (){
'use strict';
module.exports = function getXMLHttpRequest() {
var progId,
Expand All @@ -6879,7 +6882,7 @@ module.exports = function getXMLHttpRequest() {
}
};

}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{}],120:[function(require,module,exports){
'use strict';
var getXMLHttpRequest = require(119);
Expand Down Expand Up @@ -13147,7 +13150,7 @@ function isScheduler(value) {
exports.isScheduler = isScheduler;

},{}],233:[function(require,module,exports){
(function (global){
(function (global){(function (){
"use strict";
/**
* window: browser in DOM main thread
Expand All @@ -13161,7 +13164,7 @@ if (!exports.root) {
throw new Error('RxJS could not find any global context (window, self, global)');
}

}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{}],234:[function(require,module,exports){
"use strict";
var root_1 = require(233);
Expand Down Expand Up @@ -16949,7 +16952,7 @@ module.exports = {
module.exports = require(307)

},{"307":307}],303:[function(require,module,exports){
(function (Promise){
(function (Promise){(function (){
'use strict';

var asap = require(115);
Expand Down Expand Up @@ -17164,7 +17167,7 @@ function doResolve(fn, promise) {
}
}

}).call(this,typeof Promise === "function" ? Promise : require(302))
}).call(this)}).call(this,typeof Promise === "function" ? Promise : require(302))
},{"115":115,"302":302}],304:[function(require,module,exports){
'use strict';

Expand Down Expand Up @@ -17526,7 +17529,7 @@ Promise.disableSynchronous = function() {
};

},{"303":303}],310:[function(require,module,exports){
(function (global){
(function (global){(function (){
'use strict';

Object.defineProperty(exports, "__esModule", {
Expand Down Expand Up @@ -17556,7 +17559,7 @@ if (typeof self !== 'undefined') {

var result = (0, _ponyfill2['default'])(root);
exports['default'] = result;
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{"311":311}],311:[function(require,module,exports){
'use strict';

Expand Down
2 changes: 1 addition & 1 deletion dist/falcor.all.min.js

Large diffs are not rendered by default.

37 changes: 20 additions & 17 deletions dist/falcor.browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -1096,9 +1096,12 @@ var applyErrorPrototype = require(14);
* Does not allow null in path
*
* @private
* @param {Object} [options] - Optional object containing additional error information
* @param {Array} [options.requestedPath] - The path that was being processed when the error occurred
*/
function NullInPathError() {
var instance = new Error("`null` and `undefined` are not allowed in branch key positions");
function NullInPathError(options) {
var requestedPathString = options && options.requestedPath && options.requestedPath.join ? options.requestedPath.join(", ") : "";
var instance = new Error("`null` and `undefined` are not allowed in branch key positions for requested path: " + requestedPathString);

instance.name = "NullInPathError";

Expand Down Expand Up @@ -3767,7 +3770,7 @@ InvalidateResponse.prototype._subscribe = function _subscribe(observer) {
module.exports = InvalidateResponse;

},{"51":51,"87":87,"90":90}],51:[function(require,module,exports){
(function (Promise){
(function (Promise){(function (){
var ModelResponseObserver = require(52);
var $$observable = require(158).default;
var toEsObservable = require(107);
Expand Down Expand Up @@ -3919,7 +3922,7 @@ ModelResponse.prototype.then = function then(onNext, onError) {

module.exports = ModelResponse;

}).call(this,typeof Promise === "function" ? Promise : require(150))
}).call(this)}).call(this,typeof Promise === "function" ? Promise : require(150))
},{"107":107,"150":150,"158":158,"52":52}],52:[function(require,module,exports){
var noop = require(94);

Expand Down Expand Up @@ -4917,7 +4920,7 @@ function setNode(

if (key == null) {
if (branch) {
throw new NullInPathError();
throw new NullInPathError({ requestedPath: requestedPath });
} else if (node) {
key = node.$_key;
}
Expand Down Expand Up @@ -5148,7 +5151,7 @@ function setNode(

if (key == null) {
if (branch) {
throw new NullInPathError();
throw new NullInPathError({ requestedPath: requestedPath });
} else if (node) {
key = node.$_key;
}
Expand Down Expand Up @@ -5388,7 +5391,7 @@ function setNode(

if (key == null) {
if (branch) {
throw new NullInPathError();
throw new NullInPathError({ requestedPath: requestedPath });
} else if (node) {
key = node.$_key;
}
Expand Down Expand Up @@ -6472,7 +6475,7 @@ RawTask.prototype.call = function () {
};

},{"114":114}],114:[function(require,module,exports){
(function (global){
(function (global){(function (){
"use strict";

// Use the fastest means possible to execute a task in its own turn, with
Expand Down Expand Up @@ -6697,7 +6700,7 @@ rawAsap.makeRequestCallFromTimer = makeRequestCallFromTimer;
// back into ASAP proper.
// https://github.com/tildeio/rsvp.js/blob/cddf7232546a9cf858524b75cde6f9edf72620a7/lib/rsvp/asap.js

}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{}],115:[function(require,module,exports){
'use strict';
var request = require(119);
Expand Down Expand Up @@ -6829,7 +6832,7 @@ module.exports = function buildQueryObject(url, method, queryData) {
};

},{}],117:[function(require,module,exports){
(function (global){
(function (global){(function (){
'use strict';
// Get CORS support even for older IE
module.exports = function getCORSRequest() {
Expand All @@ -6843,9 +6846,9 @@ module.exports = function getCORSRequest() {
}
};

}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{}],118:[function(require,module,exports){
(function (global){
(function (global){(function (){
'use strict';
module.exports = function getXMLHttpRequest() {
var progId,
Expand All @@ -6871,7 +6874,7 @@ module.exports = function getXMLHttpRequest() {
}
};

}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{}],119:[function(require,module,exports){
'use strict';
var getXMLHttpRequest = require(118);
Expand Down Expand Up @@ -8811,7 +8814,7 @@ module.exports = function unescape(str) {
module.exports = require(155)

},{"155":155}],151:[function(require,module,exports){
(function (Promise){
(function (Promise){(function (){
'use strict';

var asap = require(114);
Expand Down Expand Up @@ -9026,7 +9029,7 @@ function doResolve(fn, promise) {
}
}

}).call(this,typeof Promise === "function" ? Promise : require(150))
}).call(this)}).call(this,typeof Promise === "function" ? Promise : require(150))
},{"114":114,"150":150}],152:[function(require,module,exports){
'use strict';

Expand Down Expand Up @@ -9388,7 +9391,7 @@ Promise.disableSynchronous = function() {
};

},{"151":151}],158:[function(require,module,exports){
(function (global){
(function (global){(function (){
'use strict';

Object.defineProperty(exports, "__esModule", {
Expand Down Expand Up @@ -9418,7 +9421,7 @@ if (typeof self !== 'undefined') {

var result = (0, _ponyfill2['default'])(root);
exports['default'] = result;
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{"159":159}],159:[function(require,module,exports){
'use strict';

Expand Down
2 changes: 1 addition & 1 deletion dist/falcor.browser.min.js

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions lib/errors/NullInPathError.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ var applyErrorPrototype = require("./applyErrorPrototype");
* Does not allow null in path
*
* @private
* @param {Object} [options] - Optional object containing additional error information
* @param {Array} [options.requestedPath] - The path that was being processed when the error occurred
*/
function NullInPathError() {
var instance = new Error("`null` and `undefined` are not allowed in branch key positions");
function NullInPathError(options) {
var requestedPathString = options && options.requestedPath && options.requestedPath.join ? options.requestedPath.join(", ") : "";
var instance = new Error("`null` and `undefined` are not allowed in branch key positions for requested path: " + requestedPathString);

instance.name = "NullInPathError";

Expand Down
2 changes: 1 addition & 1 deletion lib/set/setJSONGraphs.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ function setNode(

if (key == null) {
if (branch) {
throw new NullInPathError();
throw new NullInPathError({ requestedPath: requestedPath });
} else if (node) {
key = node.$_key;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/set/setPathMaps.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ function setNode(

if (key == null) {
if (branch) {
throw new NullInPathError();
throw new NullInPathError({ requestedPath: requestedPath });
} else if (node) {
key = node.$_key;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/set/setPathValues.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ function setNode(

if (key == null) {
if (branch) {
throw new NullInPathError();
throw new NullInPathError({ requestedPath: requestedPath });
} else if (node) {
key = node.$_key;
}
Expand Down
Loading