{"action":"created","comment":{"url":"https://api.github.com/repos/motech-implementations/mim/pulls/comments/29157931","id":29157931,"diff_hunk":"@@ -116,14 +115,21 @@ public UserResponse getUserDetails(@PathVariable String serviceName,\n \n     private UserResponse getKilkariResponseUser(Long callingNumber) {\n         KilkariUserResponse user = new KilkariUserResponse();\n-        Subscriber subscriber = kilkariService.getSubscriber(callingNumber);\n-        if (subscriber == null) {\n-            throw new NotFoundException(String.format(NOT_FOUND, CALLING_NUMBER));\n-        }\n-        Set<Subscription> subscriptions = subscriber.getSubscriptions();\n         Set<String> packs = new HashSet<>();\n-        for (Subscription subscription : subscriptions) {\n-            packs.add(subscription.getSubscriptionPack().getName());\n+        Subscriber subscriber = kilkariService.getSubscriber(callingNumber);\n+        if (subscriber != null) {\n+            Set<Subscription> subscriptions = subscriber.getSubscriptions();\n+            for (Subscription subscription : subscriptions) {\n+                packs.add(subscription.getSubscriptionPack().getName());\n+            }\n+        } else {\n+            /*\n+            No subscriber found in the database, according to https://github.com/koshalt/mim/issues/9#event-288912397\n+            we need to respond with an empty subscription list, the circle provider in the request and our guess as\n+            to what the defaultLanguageLocationCode is, which is done after this method returns\n+            */\n+            //todo: figure out the defaultLanguageLocationCode, should that be coming from the language module?\n+            user.setDefaultLanguageLocationCode(\"??\");\n         }\n         user.setSubscriptionPackList(packs);","path":"api/src/main/java/org/motechproject/nms/api/web/UserController.java","position":35,"original_position":35,"commit_id":"5eca55e4f501ecdeb3e3c2f837ff90f15b252bba","original_commit_id":"5eca55e4f501ecdeb3e3c2f837ff90f15b252bba","user":{"login":"frankhuster","id":5107550,"avatar_url":"https://avatars.githubusercontent.com/u/5107550?v=3","gravatar_id":"","url":"https://api.github.com/users/frankhuster","html_url":"https://github.com/frankhuster","followers_url":"https://api.github.com/users/frankhuster/followers","following_url":"https://api.github.com/users/frankhuster/following{/other_user}","gists_url":"https://api.github.com/users/frankhuster/gists{/gist_id}","starred_url":"https://api.github.com/users/frankhuster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frankhuster/subscriptions","organizations_url":"https://api.github.com/users/frankhuster/orgs","repos_url":"https://api.github.com/users/frankhuster/repos","events_url":"https://api.github.com/users/frankhuster/events{/privacy}","received_events_url":"https://api.github.com/users/frankhuster/received_events","type":"User","site_admin":false},"body":"Darn, forgot to include that.\r\n...coming right up!","created_at":"2015-04-27T15:37:35Z","updated_at":"2015-04-27T15:37:35Z","html_url":"https://github.com/motech-implementations/mim/pull/109#discussion_r29157931","pull_request_url":"https://api.github.com/repos/motech-implementations/mim/pulls/109","_links":{"self":{"href":"https://api.github.com/repos/motech-implementations/mim/pulls/comments/29157931"},"html":{"href":"https://github.com/motech-implementations/mim/pull/109#discussion_r29157931"},"pull_request":{"href":"https://api.github.com/repos/motech-implementations/mim/pulls/109"}}},"pull_request":{"url":"https://api.github.com/repos/motech-implementations/mim/pulls/109","id":34113633,"html_url":"https://github.com/motech-implementations/mim/pull/109","diff_url":"https://github.com/motech-implementations/mim/pull/109.diff","patch_url":"https://github.com/motech-implementations/mim/pull/109.patch","issue_url":"https://api.github.com/repos/motech-implementations/mim/issues/109","number":109,"state":"open","locked":false,"title":"Fixes #16","user":{"login":"frankhuster","id":5107550,"avatar_url":"https://avatars.githubusercontent.com/u/5107550?v=3","gravatar_id":"","url":"https://api.github.com/users/frankhuster","html_url":"https://github.com/frankhuster","followers_url":"https://api.github.com/users/frankhuster/followers","following_url":"https://api.github.com/users/frankhuster/following{/other_user}","gists_url":"https://api.github.com/users/frankhuster/gists{/gist_id}","starred_url":"https://api.github.com/users/frankhuster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frankhuster/subscriptions","organizations_url":"https://api.github.com/users/frankhuster/orgs","repos_url":"https://api.github.com/users/frankhuster/repos","events_url":"https://api.github.com/users/frankhuster/events{/privacy}","received_events_url":"https://api.github.com/users/frankhuster/received_events","type":"User","site_admin":false},"body":"To the best of my latest understanding of the spec / spec changes\r\nAlso, noticed that languageLocationCode was missing from the request\r\nparameters of /kilkari/inbox (see 4.2.2.1.3) so I added it.","created_at":"2015-04-25T21:42:24Z","updated_at":"2015-04-27T15:37:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b69a028208bafede8d783c11115ae5b2135c2830","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/motech-implementations/mim/pulls/109/commits","review_comments_url":"https://api.github.com/repos/motech-implementations/mim/pulls/109/comments","review_comment_url":"https://api.github.com/repos/motech-implementations/mim/pulls/comments{/number}","comments_url":"https://api.github.com/repos/motech-implementations/mim/issues/109/comments","statuses_url":"https://api.github.com/repos/motech-implementations/mim/statuses/5eca55e4f501ecdeb3e3c2f837ff90f15b252bba","head":{"label":"motech-implementations:16","ref":"16","sha":"5eca55e4f501ecdeb3e3c2f837ff90f15b252bba","user":{"login":"motech-implementations","id":6608253,"avatar_url":"https://avatars.githubusercontent.com/u/6608253?v=3","gravatar_id":"","url":"https://api.github.com/users/motech-implementations","html_url":"https://github.com/motech-implementations","followers_url":"https://api.github.com/users/motech-implementations/followers","following_url":"https://api.github.com/users/motech-implementations/following{/other_user}","gists_url":"https://api.github.com/users/motech-implementations/gists{/gist_id}","starred_url":"https://api.github.com/users/motech-implementations/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/motech-implementations/subscriptions","organizations_url":"https://api.github.com/users/motech-implementations/orgs","repos_url":"https://api.github.com/users/motech-implementations/repos","events_url":"https://api.github.com/users/motech-implementations/events{/privacy}","received_events_url":"https://api.github.com/users/motech-implementations/received_events","type":"Organization","site_admin":false},"repo":{"id":33508795,"name":"mim","full_name":"motech-implementations/mim","owner":{"login":"motech-implementations","id":6608253,"avatar_url":"https://avatars.githubusercontent.com/u/6608253?v=3","gravatar_id":"","url":"https://api.github.com/users/motech-implementations","html_url":"https://github.com/motech-implementations","followers_url":"https://api.github.com/users/motech-implementations/followers","following_url":"https://api.github.com/users/motech-implementations/following{/other_user}","gists_url":"https://api.github.com/users/motech-implementations/gists{/gist_id}","starred_url":"https://api.github.com/users/motech-implementations/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/motech-implementations/subscriptions","organizations_url":"https://api.github.com/users/motech-implementations/orgs","repos_url":"https://api.github.com/users/motech-implementations/repos","events_url":"https://api.github.com/users/motech-implementations/events{/privacy}","received_events_url":"https://api.github.com/users/motech-implementations/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/motech-implementations/mim","description":"mim","fork":false,"url":"https://api.github.com/repos/motech-implementations/mim","forks_url":"https://api.github.com/repos/motech-implementations/mim/forks","keys_url":"https://api.github.com/repos/motech-implementations/mim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/motech-implementations/mim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/motech-implementations/mim/teams","hooks_url":"https://api.github.com/repos/motech-implementations/mim/hooks","issue_events_url":"https://api.github.com/repos/motech-implementations/mim/issues/events{/number}","events_url":"https://api.github.com/repos/motech-implementations/mim/events","assignees_url":"https://api.github.com/repos/motech-implementations/mim/assignees{/user}","branches_url":"https://api.github.com/repos/motech-implementations/mim/branches{/branch}","tags_url":"https://api.github.com/repos/motech-implementations/mim/tags","blobs_url":"https://api.github.com/repos/motech-implementations/mim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/motech-implementations/mim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/motech-implementations/mim/git/refs{/sha}","trees_url":"https://api.github.com/repos/motech-implementations/mim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/motech-implementations/mim/statuses/{sha}","languages_url":"https://api.github.com/repos/motech-implementations/mim/languages","stargazers_url":"https://api.github.com/repos/motech-implementations/mim/stargazers","contributors_url":"https://api.github.com/repos/motech-implementations/mim/contributors","subscribers_url":"https://api.github.com/repos/motech-implementations/mim/subscribers","subscription_url":"https://api.github.com/repos/motech-implementations/mim/subscription","commits_url":"https://api.github.com/repos/motech-implementations/mim/commits{/sha}","git_commits_url":"https://api.github.com/repos/motech-implementations/mim/git/commits{/sha}","comments_url":"https://api.github.com/repos/motech-implementations/mim/comments{/number}","issue_comment_url":"https://api.github.com/repos/motech-implementations/mim/issues/comments{/number}","contents_url":"https://api.github.com/repos/motech-implementations/mim/contents/{+path}","compare_url":"https://api.github.com/repos/motech-implementations/mim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/motech-implementations/mim/merges","archive_url":"https://api.github.com/repos/motech-implementations/mim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/motech-implementations/mim/downloads","issues_url":"https://api.github.com/repos/motech-implementations/mim/issues{/number}","pulls_url":"https://api.github.com/repos/motech-implementations/mim/pulls{/number}","milestones_url":"https://api.github.com/repos/motech-implementations/mim/milestones{/number}","notifications_url":"https://api.github.com/repos/motech-implementations/mim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/motech-implementations/mim/labels{/name}","releases_url":"https://api.github.com/repos/motech-implementations/mim/releases{/id}","created_at":"2015-04-06T22:18:18Z","updated_at":"2015-04-27T15:30:11Z","pushed_at":"2015-04-27T15:32:33Z","git_url":"git://github.com/motech-implementations/mim.git","ssh_url":"git@github.com:motech-implementations/mim.git","clone_url":"https://github.com/motech-implementations/mim.git","svn_url":"https://github.com/motech-implementations/mim","homepage":null,"size":6372,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":128,"forks":1,"open_issues":128,"watchers":0,"default_branch":"master"}},"base":{"label":"motech-implementations:master","ref":"master","sha":"76a6dba100ace3be4a9fa0d563a26137ccd0d546","user":{"login":"motech-implementations","id":6608253,"avatar_url":"https://avatars.githubusercontent.com/u/6608253?v=3","gravatar_id":"","url":"https://api.github.com/users/motech-implementations","html_url":"https://github.com/motech-implementations","followers_url":"https://api.github.com/users/motech-implementations/followers","following_url":"https://api.github.com/users/motech-implementations/following{/other_user}","gists_url":"https://api.github.com/users/motech-implementations/gists{/gist_id}","starred_url":"https://api.github.com/users/motech-implementations/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/motech-implementations/subscriptions","organizations_url":"https://api.github.com/users/motech-implementations/orgs","repos_url":"https://api.github.com/users/motech-implementations/repos","events_url":"https://api.github.com/users/motech-implementations/events{/privacy}","received_events_url":"https://api.github.com/users/motech-implementations/received_events","type":"Organization","site_admin":false},"repo":{"id":33508795,"name":"mim","full_name":"motech-implementations/mim","owner":{"login":"motech-implementations","id":6608253,"avatar_url":"https://avatars.githubusercontent.com/u/6608253?v=3","gravatar_id":"","url":"https://api.github.com/users/motech-implementations","html_url":"https://github.com/motech-implementations","followers_url":"https://api.github.com/users/motech-implementations/followers","following_url":"https://api.github.com/users/motech-implementations/following{/other_user}","gists_url":"https://api.github.com/users/motech-implementations/gists{/gist_id}","starred_url":"https://api.github.com/users/motech-implementations/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/motech-implementations/subscriptions","organizations_url":"https://api.github.com/users/motech-implementations/orgs","repos_url":"https://api.github.com/users/motech-implementations/repos","events_url":"https://api.github.com/users/motech-implementations/events{/privacy}","received_events_url":"https://api.github.com/users/motech-implementations/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/motech-implementations/mim","description":"mim","fork":false,"url":"https://api.github.com/repos/motech-implementations/mim","forks_url":"https://api.github.com/repos/motech-implementations/mim/forks","keys_url":"https://api.github.com/repos/motech-implementations/mim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/motech-implementations/mim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/motech-implementations/mim/teams","hooks_url":"https://api.github.com/repos/motech-implementations/mim/hooks","issue_events_url":"https://api.github.com/repos/motech-implementations/mim/issues/events{/number}","events_url":"https://api.github.com/repos/motech-implementations/mim/events","assignees_url":"https://api.github.com/repos/motech-implementations/mim/assignees{/user}","branches_url":"https://api.github.com/repos/motech-implementations/mim/branches{/branch}","tags_url":"https://api.github.com/repos/motech-implementations/mim/tags","blobs_url":"https://api.github.com/repos/motech-implementations/mim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/motech-implementations/mim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/motech-implementations/mim/git/refs{/sha}","trees_url":"https://api.github.com/repos/motech-implementations/mim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/motech-implementations/mim/statuses/{sha}","languages_url":"https://api.github.com/repos/motech-implementations/mim/languages","stargazers_url":"https://api.github.com/repos/motech-implementations/mim/stargazers","contributors_url":"https://api.github.com/repos/motech-implementations/mim/contributors","subscribers_url":"https://api.github.com/repos/motech-implementations/mim/subscribers","subscription_url":"https://api.github.com/repos/motech-implementations/mim/subscription","commits_url":"https://api.github.com/repos/motech-implementations/mim/commits{/sha}","git_commits_url":"https://api.github.com/repos/motech-implementations/mim/git/commits{/sha}","comments_url":"https://api.github.com/repos/motech-implementations/mim/comments{/number}","issue_comment_url":"https://api.github.com/repos/motech-implementations/mim/issues/comments{/number}","contents_url":"https://api.github.com/repos/motech-implementations/mim/contents/{+path}","compare_url":"https://api.github.com/repos/motech-implementations/mim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/motech-implementations/mim/merges","archive_url":"https://api.github.com/repos/motech-implementations/mim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/motech-implementations/mim/downloads","issues_url":"https://api.github.com/repos/motech-implementations/mim/issues{/number}","pulls_url":"https://api.github.com/repos/motech-implementations/mim/pulls{/number}","milestones_url":"https://api.github.com/repos/motech-implementations/mim/milestones{/number}","notifications_url":"https://api.github.com/repos/motech-implementations/mim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/motech-implementations/mim/labels{/name}","releases_url":"https://api.github.com/repos/motech-implementations/mim/releases{/id}","created_at":"2015-04-06T22:18:18Z","updated_at":"2015-04-27T15:30:11Z","pushed_at":"2015-04-27T15:32:33Z","git_url":"git://github.com/motech-implementations/mim.git","ssh_url":"git@github.com:motech-implementations/mim.git","clone_url":"https://github.com/motech-implementations/mim.git","svn_url":"https://github.com/motech-implementations/mim","homepage":null,"size":6372,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":128,"forks":1,"open_issues":128,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/motech-implementations/mim/pulls/109"},"html":{"href":"https://github.com/motech-implementations/mim/pull/109"},"issue":{"href":"https://api.github.com/repos/motech-implementations/mim/issues/109"},"comments":{"href":"https://api.github.com/repos/motech-implementations/mim/issues/109/comments"},"review_comments":{"href":"https://api.github.com/repos/motech-implementations/mim/pulls/109/comments"},"review_comment":{"href":"https://api.github.com/repos/motech-implementations/mim/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/motech-implementations/mim/pulls/109/commits"},"statuses":{"href":"https://api.github.com/repos/motech-implementations/mim/statuses/5eca55e4f501ecdeb3e3c2f837ff90f15b252bba"}}}}