{"action":"created","comment":{"url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/pulls/comments/194126415","pull_request_review_id":127247289,"id":194126415,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NDEyNjQxNQ==","diff_hunk":"@@ -606,18 +609,26 @@ export const noFDCWarning = (\n );\n \n \n-const options = [\n-  { id: 1, label: 'first' },\n-  { id: 2, label: 'second' },\n-  { id: 3, label: 'third' },\n-  { id: 4, label: 'fourth' },\n-];\n+export function queryForFacilities(input = '') {\n+  // Only search if the input has a length >= 3, otherwise, return an empty array\n+  if (input.length < 3) {\n+    return Promise.resolve([]);\n+  }\n \n+  const url = appendQuery('/facilities/suggested', {\n+    type: ['health', 'dod_health'],\n+    name_part: input // eslint-disable-line camelcase\n+  });\n \n-// Mimic querying the api for options\n-export function queryForFacilities(input = '') {\n-  // Emulate a fast api call\n-  return Promise.resolve(options.filter(o => o.label.includes(input)));\n+  return apiRequest(url, {},\n+    (response) => {\n+      return response.data.map(f => ({ id: f.id, label: f.attributes.name }));\n+    },\n+    (error) => {\n+      Raven.captureMessage('Error querying for facilities', { input, error });","path":"src/applications/disability-benefits/526EZ/helpers.jsx","position":46,"original_position":46,"commit_id":"38f9c13119feb7f5a525be224b2e167f4a225a5e","original_commit_id":"38f9c13119feb7f5a525be224b2e167f4a225a5e","user":{"login":"cvalarida","id":12970166,"node_id":"MDQ6VXNlcjEyOTcwMTY2","avatar_url":"https://avatars0.githubusercontent.com/u/12970166?v=4","gravatar_id":"","url":"https://api.github.com/users/cvalarida","html_url":"https://github.com/cvalarida","followers_url":"https://api.github.com/users/cvalarida/followers","following_url":"https://api.github.com/users/cvalarida/following{/other_user}","gists_url":"https://api.github.com/users/cvalarida/gists{/gist_id}","starred_url":"https://api.github.com/users/cvalarida/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cvalarida/subscriptions","organizations_url":"https://api.github.com/users/cvalarida/orgs","repos_url":"https://api.github.com/users/cvalarida/repos","events_url":"https://api.github.com/users/cvalarida/events{/privacy}","received_events_url":"https://api.github.com/users/cvalarida/received_events","type":"User","site_admin":false},"body":"Do you mean log something else to sentry or the `return []` on the next line?","created_at":"2018-06-08T17:22:07Z","updated_at":"2018-06-08T17:22:07Z","html_url":"https://github.com/department-of-veterans-affairs/vets-website/pull/7839#discussion_r194126415","pull_request_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/pulls/7839","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/pulls/comments/194126415"},"html":{"href":"https://github.com/department-of-veterans-affairs/vets-website/pull/7839#discussion_r194126415"},"pull_request":{"href":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/pulls/7839"}},"in_reply_to_id":194123218},"pull_request":{"url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/pulls/7839","id":193465313,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkzNDY1MzEz","html_url":"https://github.com/department-of-veterans-affairs/vets-website/pull/7839","diff_url":"https://github.com/department-of-veterans-affairs/vets-website/pull/7839.diff","patch_url":"https://github.com/department-of-veterans-affairs/vets-website/pull/7839.patch","issue_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/issues/7839","number":7839,"state":"open","locked":false,"title":"Facilty type ahead","user":{"login":"cvalarida","id":12970166,"node_id":"MDQ6VXNlcjEyOTcwMTY2","avatar_url":"https://avatars0.githubusercontent.com/u/12970166?v=4","gravatar_id":"","url":"https://api.github.com/users/cvalarida","html_url":"https://github.com/cvalarida","followers_url":"https://api.github.com/users/cvalarida/followers","following_url":"https://api.github.com/users/cvalarida/following{/other_user}","gists_url":"https://api.github.com/users/cvalarida/gists{/gist_id}","starred_url":"https://api.github.com/users/cvalarida/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cvalarida/subscriptions","organizations_url":"https://api.github.com/users/cvalarida/orgs","repos_url":"https://api.github.com/users/cvalarida/repos","events_url":"https://api.github.com/users/cvalarida/events{/privacy}","received_events_url":"https://api.github.com/users/cvalarida/received_events","type":"User","site_admin":false},"body":"![image](https://user-images.githubusercontent.com/12970166/41129621-d3d810fa-6a67-11e8-9449-87ec58932d75.png)\r\n","created_at":"2018-06-07T22:32:49Z","updated_at":"2018-06-08T17:22:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b348317ae10efb7d315eb73502fe2499f6faac43","assignee":null,"assignees":[],"requested_reviewers":[{"login":"kreek","id":283834,"node_id":"MDQ6VXNlcjI4MzgzNA==","avatar_url":"https://avatars0.githubusercontent.com/u/283834?v=4","gravatar_id":"","url":"https://api.github.com/users/kreek","html_url":"https://github.com/kreek","followers_url":"https://api.github.com/users/kreek/followers","following_url":"https://api.github.com/users/kreek/following{/other_user}","gists_url":"https://api.github.com/users/kreek/gists{/gist_id}","starred_url":"https://api.github.com/users/kreek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kreek/subscriptions","organizations_url":"https://api.github.com/users/kreek/orgs","repos_url":"https://api.github.com/users/kreek/repos","events_url":"https://api.github.com/users/kreek/events{/privacy}","received_events_url":"https://api.github.com/users/kreek/received_events","type":"User","site_admin":false},{"login":"markgreenburg","id":24251447,"node_id":"MDQ6VXNlcjI0MjUxNDQ3","avatar_url":"https://avatars0.githubusercontent.com/u/24251447?v=4","gravatar_id":"","url":"https://api.github.com/users/markgreenburg","html_url":"https://github.com/markgreenburg","followers_url":"https://api.github.com/users/markgreenburg/followers","following_url":"https://api.github.com/users/markgreenburg/following{/other_user}","gists_url":"https://api.github.com/users/markgreenburg/gists{/gist_id}","starred_url":"https://api.github.com/users/markgreenburg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markgreenburg/subscriptions","organizations_url":"https://api.github.com/users/markgreenburg/orgs","repos_url":"https://api.github.com/users/markgreenburg/repos","events_url":"https://api.github.com/users/markgreenburg/events{/privacy}","received_events_url":"https://api.github.com/users/markgreenburg/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/pulls/7839/commits","review_comments_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/pulls/7839/comments","review_comment_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/pulls/comments{/number}","comments_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/issues/7839/comments","statuses_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/statuses/38f9c13119feb7f5a525be224b2e167f4a225a5e","head":{"label":"department-of-veterans-affairs:facilty-type-ahead-cv","ref":"facilty-type-ahead-cv","sha":"38f9c13119feb7f5a525be224b2e167f4a225a5e","user":{"login":"department-of-veterans-affairs","id":5421563,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0MjE1NjM=","avatar_url":"https://avatars1.githubusercontent.com/u/5421563?v=4","gravatar_id":"","url":"https://api.github.com/users/department-of-veterans-affairs","html_url":"https://github.com/department-of-veterans-affairs","followers_url":"https://api.github.com/users/department-of-veterans-affairs/followers","following_url":"https://api.github.com/users/department-of-veterans-affairs/following{/other_user}","gists_url":"https://api.github.com/users/department-of-veterans-affairs/gists{/gist_id}","starred_url":"https://api.github.com/users/department-of-veterans-affairs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/department-of-veterans-affairs/subscriptions","organizations_url":"https://api.github.com/users/department-of-veterans-affairs/orgs","repos_url":"https://api.github.com/users/department-of-veterans-affairs/repos","events_url":"https://api.github.com/users/department-of-veterans-affairs/events{/privacy}","received_events_url":"https://api.github.com/users/department-of-veterans-affairs/received_events","type":"Organization","site_admin":false},"repo":{"id":33202667,"node_id":"MDEwOlJlcG9zaXRvcnkzMzIwMjY2Nw==","name":"vets-website","full_name":"department-of-veterans-affairs/vets-website","owner":{"login":"department-of-veterans-affairs","id":5421563,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0MjE1NjM=","avatar_url":"https://avatars1.githubusercontent.com/u/5421563?v=4","gravatar_id":"","url":"https://api.github.com/users/department-of-veterans-affairs","html_url":"https://github.com/department-of-veterans-affairs","followers_url":"https://api.github.com/users/department-of-veterans-affairs/followers","following_url":"https://api.github.com/users/department-of-veterans-affairs/following{/other_user}","gists_url":"https://api.github.com/users/department-of-veterans-affairs/gists{/gist_id}","starred_url":"https://api.github.com/users/department-of-veterans-affairs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/department-of-veterans-affairs/subscriptions","organizations_url":"https://api.github.com/users/department-of-veterans-affairs/orgs","repos_url":"https://api.github.com/users/department-of-veterans-affairs/repos","events_url":"https://api.github.com/users/department-of-veterans-affairs/events{/privacy}","received_events_url":"https://api.github.com/users/department-of-veterans-affairs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/department-of-veterans-affairs/vets-website","description":"Frontend for Vets.gov","fork":false,"url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website","forks_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/forks","keys_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/keys{/key_id}","collaborators_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/teams","hooks_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/hooks","issue_events_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/issues/events{/number}","events_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/events","assignees_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/assignees{/user}","branches_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/branches{/branch}","tags_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/tags","blobs_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/git/refs{/sha}","trees_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/git/trees{/sha}","statuses_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/statuses/{sha}","languages_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/languages","stargazers_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/stargazers","contributors_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/contributors","subscribers_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/subscribers","subscription_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/subscription","commits_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/commits{/sha}","git_commits_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/git/commits{/sha}","comments_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/comments{/number}","issue_comment_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/issues/comments{/number}","contents_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/contents/{+path}","compare_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/compare/{base}...{head}","merges_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/merges","archive_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/downloads","issues_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/issues{/number}","pulls_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/pulls{/number}","milestones_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/milestones{/number}","notifications_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/labels{/name}","releases_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/releases{/id}","deployments_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/deployments","created_at":"2015-03-31T18:34:05Z","updated_at":"2018-06-08T17:17:24Z","pushed_at":"2018-06-08T17:17:17Z","git_url":"git://github.com/department-of-veterans-affairs/vets-website.git","ssh_url":"git@github.com:department-of-veterans-affairs/vets-website.git","clone_url":"https://github.com/department-of-veterans-affairs/vets-website.git","svn_url":"https://github.com/department-of-veterans-affairs/vets-website","homepage":"","size":146592,"stargazers_count":111,"watchers_count":111,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":55,"mirror_url":null,"archived":false,"open_issues_count":78,"license":{"key":"cc0-1.0","name":"Creative Commons Zero v1.0 Universal","spdx_id":"CC0-1.0","url":"https://api.github.com/licenses/cc0-1.0","node_id":"MDc6TGljZW5zZTY="},"forks":55,"open_issues":78,"watchers":111,"default_branch":"master"}},"base":{"label":"department-of-veterans-affairs:master","ref":"master","sha":"66f572688005594725a6c0d9413e4ec29c80ff9d","user":{"login":"department-of-veterans-affairs","id":5421563,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0MjE1NjM=","avatar_url":"https://avatars1.githubusercontent.com/u/5421563?v=4","gravatar_id":"","url":"https://api.github.com/users/department-of-veterans-affairs","html_url":"https://github.com/department-of-veterans-affairs","followers_url":"https://api.github.com/users/department-of-veterans-affairs/followers","following_url":"https://api.github.com/users/department-of-veterans-affairs/following{/other_user}","gists_url":"https://api.github.com/users/department-of-veterans-affairs/gists{/gist_id}","starred_url":"https://api.github.com/users/department-of-veterans-affairs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/department-of-veterans-affairs/subscriptions","organizations_url":"https://api.github.com/users/department-of-veterans-affairs/orgs","repos_url":"https://api.github.com/users/department-of-veterans-affairs/repos","events_url":"https://api.github.com/users/department-of-veterans-affairs/events{/privacy}","received_events_url":"https://api.github.com/users/department-of-veterans-affairs/received_events","type":"Organization","site_admin":false},"repo":{"id":33202667,"node_id":"MDEwOlJlcG9zaXRvcnkzMzIwMjY2Nw==","name":"vets-website","full_name":"department-of-veterans-affairs/vets-website","owner":{"login":"department-of-veterans-affairs","id":5421563,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0MjE1NjM=","avatar_url":"https://avatars1.githubusercontent.com/u/5421563?v=4","gravatar_id":"","url":"https://api.github.com/users/department-of-veterans-affairs","html_url":"https://github.com/department-of-veterans-affairs","followers_url":"https://api.github.com/users/department-of-veterans-affairs/followers","following_url":"https://api.github.com/users/department-of-veterans-affairs/following{/other_user}","gists_url":"https://api.github.com/users/department-of-veterans-affairs/gists{/gist_id}","starred_url":"https://api.github.com/users/department-of-veterans-affairs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/department-of-veterans-affairs/subscriptions","organizations_url":"https://api.github.com/users/department-of-veterans-affairs/orgs","repos_url":"https://api.github.com/users/department-of-veterans-affairs/repos","events_url":"https://api.github.com/users/department-of-veterans-affairs/events{/privacy}","received_events_url":"https://api.github.com/users/department-of-veterans-affairs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/department-of-veterans-affairs/vets-website","description":"Frontend for Vets.gov","fork":false,"url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website","forks_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/forks","keys_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/keys{/key_id}","collaborators_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/teams","hooks_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/hooks","issue_events_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/issues/events{/number}","events_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/events","assignees_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/assignees{/user}","branches_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/branches{/branch}","tags_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/tags","blobs_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/git/refs{/sha}","trees_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/git/trees{/sha}","statuses_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/statuses/{sha}","languages_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/languages","stargazers_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/stargazers","contributors_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/contributors","subscribers_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/subscribers","subscription_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/subscription","commits_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/commits{/sha}","git_commits_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/git/commits{/sha}","comments_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/comments{/number}","issue_comment_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/issues/comments{/number}","contents_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/contents/{+path}","compare_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/compare/{base}...{head}","merges_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/merges","archive_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/downloads","issues_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/issues{/number}","pulls_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/pulls{/number}","milestones_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/milestones{/number}","notifications_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/labels{/name}","releases_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/releases{/id}","deployments_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/deployments","created_at":"2015-03-31T18:34:05Z","updated_at":"2018-06-08T17:17:24Z","pushed_at":"2018-06-08T17:17:17Z","git_url":"git://github.com/department-of-veterans-affairs/vets-website.git","ssh_url":"git@github.com:department-of-veterans-affairs/vets-website.git","clone_url":"https://github.com/department-of-veterans-affairs/vets-website.git","svn_url":"https://github.com/department-of-veterans-affairs/vets-website","homepage":"","size":146592,"stargazers_count":111,"watchers_count":111,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":55,"mirror_url":null,"archived":false,"open_issues_count":78,"license":{"key":"cc0-1.0","name":"Creative Commons Zero v1.0 Universal","spdx_id":"CC0-1.0","url":"https://api.github.com/licenses/cc0-1.0","node_id":"MDc6TGljZW5zZTY="},"forks":55,"open_issues":78,"watchers":111,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/pulls/7839"},"html":{"href":"https://github.com/department-of-veterans-affairs/vets-website/pull/7839"},"issue":{"href":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/issues/7839"},"comments":{"href":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/issues/7839/comments"},"review_comments":{"href":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/pulls/7839/comments"},"review_comment":{"href":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/pulls/7839/commits"},"statuses":{"href":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/statuses/38f9c13119feb7f5a525be224b2e167f4a225a5e"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"cvalarida"}}