{"action":"created","issue":{"url":"https://api.github.com/repos/Netflix/falcor/issues/535","labels_url":"https://api.github.com/repos/Netflix/falcor/issues/535/labels{/name}","comments_url":"https://api.github.com/repos/Netflix/falcor/issues/535/comments","events_url":"https://api.github.com/repos/Netflix/falcor/issues/535/events","html_url":"https://github.com/Netflix/falcor/issues/535","id":105485496,"number":535,"title":"MaxRetryExceededError when a route returns a null value not wrapped in an atom","user":{"login":"noonian","id":346138,"avatar_url":"https://avatars.githubusercontent.com/u/346138?v=3","gravatar_id":"","url":"https://api.github.com/users/noonian","html_url":"https://github.com/noonian","followers_url":"https://api.github.com/users/noonian/followers","following_url":"https://api.github.com/users/noonian/following{/other_user}","gists_url":"https://api.github.com/users/noonian/gists{/gist_id}","starred_url":"https://api.github.com/users/noonian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noonian/subscriptions","organizations_url":"https://api.github.com/users/noonian/orgs","repos_url":"https://api.github.com/users/noonian/repos","events_url":"https://api.github.com/users/noonian/events{/privacy}","received_events_url":"https://api.github.com/users/noonian/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"michaelbpaulson","id":4458174,"avatar_url":"https://avatars.githubusercontent.com/u/4458174?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelbpaulson","html_url":"https://github.com/michaelbpaulson","followers_url":"https://api.github.com/users/michaelbpaulson/followers","following_url":"https://api.github.com/users/michaelbpaulson/following{/other_user}","gists_url":"https://api.github.com/users/michaelbpaulson/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelbpaulson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelbpaulson/subscriptions","organizations_url":"https://api.github.com/users/michaelbpaulson/orgs","repos_url":"https://api.github.com/users/michaelbpaulson/repos","events_url":"https://api.github.com/users/michaelbpaulson/events{/privacy}","received_events_url":"https://api.github.com/users/michaelbpaulson/received_events","type":"User","site_admin":false},"milestone":null,"comments":4,"created_at":"2015-09-08T23:00:02Z","updated_at":"2015-09-09T16:41:52Z","closed_at":null,"body":"I get this error if I request a route that is returning a null value (path exists and value for prop is null):\r\n\r\n```js\r\nUncaught MaxRetryExceededError: The allowed number of retries have been exceeded.\r\n```\r\n\r\nThe error is not thrown if the null is explicitly wrapped by the route in an atom. Errors are also not thrown for other falsey values (0, false, and ''). \r\n\r\nI believe this is a bug in the falcor client code, since there are [tests for the router that suggest it is legal it return null values](https://github.com/Netflix/falcor-router/blob/master/test/unit/core/get.spec.js#L29).\r\n\r\nHere is a basic router and corresponding model invocation to reproduce the error:\r\n\r\n```js\r\n// index.js\r\nvar falcorExpress = require('falcor-express');\r\nvar Router = require('falcor-router');\r\nvar express = require('express');\r\nvar app = express();\r\n\r\napp.use('/model.json', falcorExpress.dataSourceRoute(function (req, res) {\r\n  return new Router(\r\n    [\r\n      {\r\n        route: ['thing', 'prop'],\r\n        get: function (path) {\r\n          return {\r\n            path: ['thing', 'prop'],\r\n            value: null\r\n          }\r\n        }\r\n      }\r\n    ]);\r\n}));\r\n\r\n// statically host all files in current directory\r\napp.use(express.static(__dirname + '/'));\r\n\r\nvar server = app.listen(3000);\r\n```\r\n\r\nclient code:\r\n```js\r\nvar model = new falcor.Model({source: new falcor.HttpDataSource('/model.json')});\r\nmodel.get(['thing', 'prop']).then(function (res) { console.log(res); })\r\n```"},"comment":{"url":"https://api.github.com/repos/Netflix/falcor/issues/comments/138968804","html_url":"https://github.com/Netflix/falcor/issues/535#issuecomment-138968804","issue_url":"https://api.github.com/repos/Netflix/falcor/issues/535","id":138968804,"user":{"login":"michaelbpaulson","id":4458174,"avatar_url":"https://avatars.githubusercontent.com/u/4458174?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelbpaulson","html_url":"https://github.com/michaelbpaulson","followers_url":"https://api.github.com/users/michaelbpaulson/followers","following_url":"https://api.github.com/users/michaelbpaulson/following{/other_user}","gists_url":"https://api.github.com/users/michaelbpaulson/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelbpaulson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelbpaulson/subscriptions","organizations_url":"https://api.github.com/users/michaelbpaulson/orgs","repos_url":"https://api.github.com/users/michaelbpaulson/repos","events_url":"https://api.github.com/users/michaelbpaulson/events{/privacy}","received_events_url":"https://api.github.com/users/michaelbpaulson/received_events","type":"User","site_admin":false},"created_at":"2015-09-09T16:41:52Z","updated_at":"2015-09-09T16:41:52Z","body":"Well thats to bad.  I'll look into this some more.  Hopefully should have a fix for it today.\r\n"}}