{"action":"created","issue":{"url":"https://api.github.com/repos/stormpath/stormpath-node-config/issues/11","labels_url":"https://api.github.com/repos/stormpath/stormpath-node-config/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/stormpath/stormpath-node-config/issues/11/comments","events_url":"https://api.github.com/repos/stormpath/stormpath-node-config/issues/11/events","html_url":"https://github.com/stormpath/stormpath-node-config/issues/11","id":119543552,"number":11,"title":"\"TypeError: undefined is not a function\" if no default account store","user":{"login":"robertjd","id":132343,"avatar_url":"https://avatars.githubusercontent.com/u/132343?v=3","gravatar_id":"","url":"https://api.github.com/users/robertjd","html_url":"https://github.com/robertjd","followers_url":"https://api.github.com/users/robertjd/followers","following_url":"https://api.github.com/users/robertjd/following{/other_user}","gists_url":"https://api.github.com/users/robertjd/gists{/gist_id}","starred_url":"https://api.github.com/users/robertjd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robertjd/subscriptions","organizations_url":"https://api.github.com/users/robertjd/orgs","repos_url":"https://api.github.com/users/robertjd/repos","events_url":"https://api.github.com/users/robertjd/events{/privacy}","received_events_url":"https://api.github.com/users/robertjd/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-30T17:45:01Z","updated_at":"2015-11-30T23:11:17Z","closed_at":null,"body":"Stacktrace:\r\n\r\n```\r\nTypeError: undefined is not a function\r\n    at /Users/robert/projects/express-stormpath/node_modules/stormpath-config/lib/strategy/EnrichIntegrationFromRemoteConfigStrategy.js:149:9\r\n    at Object.wrapGetResourceResponse [as _wrapGetResourceResponse] (/Users/robert/projects/express-stormpath/node_modules/stormpath/lib/ds/DataStore.js:67:12)\r\n    at onGetResourceRequestResult (/Users/robert/projects/express-stormpath/node_modules/stormpath/lib/ds/DataStore.js:278:13)\r\n    at Request.onRequestResult [as _callback] (/Users/robert/projects/express-stormpath/node_modules/stormpath/lib/ds/RequestExecutor.js:100:14)\r\n    at Request.self.callback (/Users/robert/projects/express-stormpath/node_modules/request/request.js:198:22)\r\n    at Request.emit (events.js:110:17)\r\n    at Request.<anonymous> (/Users/robert/projects/express-stormpath/node_modules/request/request.js:1035:10)\r\n    at Request.emit (events.js:129:20)\r\n    at IncomingMessage.<anonymous> (/Users/robert/projects/express-stormpath/node_modules/request/request.js:962:12)\r\n    at IncomingMessage.emit (events.js:129:20)\r\n```\r\n\r\nThis happens when there is no default account store mapped to the specified application.  This strategy should be modified to support the following situations:\r\n\r\n* If the application has 0 account stores mapped to it, we should provide the error \"No account stores are mapped to the specified application.  Account stores are required for login and registration\"\r\n\r\n* If there is no default account store for the application, then:\r\n * If `stormpath.web.register.enabled` is `true`, then we should provide the error \"No default account store is mapped to the specified application.  A default account store is required for registration.\" \r\n\r\n * If `stormpath.web.register.enabled` is `false`, then we should not error.  We should allow configuration parsing to continue, and the integration should be allowed to initialize.  This is necessary because some applications provide login but not registration."},"comment":{"url":"https://api.github.com/repos/stormpath/stormpath-node-config/issues/comments/160791557","html_url":"https://github.com/stormpath/stormpath-node-config/issues/11#issuecomment-160791557","issue_url":"https://api.github.com/repos/stormpath/stormpath-node-config/issues/11","id":160791557,"user":{"login":"robertjd","id":132343,"avatar_url":"https://avatars.githubusercontent.com/u/132343?v=3","gravatar_id":"","url":"https://api.github.com/users/robertjd","html_url":"https://github.com/robertjd","followers_url":"https://api.github.com/users/robertjd/followers","following_url":"https://api.github.com/users/robertjd/following{/other_user}","gists_url":"https://api.github.com/users/robertjd/gists{/gist_id}","starred_url":"https://api.github.com/users/robertjd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robertjd/subscriptions","organizations_url":"https://api.github.com/users/robertjd/orgs","repos_url":"https://api.github.com/users/robertjd/repos","events_url":"https://api.github.com/users/robertjd/events{/privacy}","received_events_url":"https://api.github.com/users/robertjd/received_events","type":"User","site_admin":false},"created_at":"2015-11-30T23:11:17Z","updated_at":"2015-11-30T23:11:17Z","body":"Thanks @typerandom , please ensure that the merged code has the friendly messages that are defined above."}}