{"action":"created","comment":{"url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/pulls/comments/204926116","pull_request_review_id":140063946,"id":204926116,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNDkyNjExNg==","diff_hunk":"@@ -10,26 +10,18 @@ const url = require('url');\n  */\n function modelPatronCreatorResponse(responseData, status, requestData) {\n   return {\n-    data: [\n-      {\n-        id: parseInt(responseData.link.split('/').pop(), 10),\n-        names: requestData.names,\n-        barcodes: requestData.barcodes,\n-        expirationDate: '',\n-        birthDate: requestData.birthDate,\n-        emails: requestData.emails,\n-        pin: requestData.pin,\n-        patronType: parseInt(requestData.patronType, 10),\n-        patronCodes: requestData.patronCodes,\n-        blockInfo: requestData.blockInfo,\n-        addresses: requestData.addresses,\n-        phones: requestData.phones,\n-      },\n-    ],\n-    count: 1,\n-    totalCount: 0,\n-    statusCode: status,\n-    debugInfo: [],\n+    id: parseInt(responseData.link.split('/').pop(), 10),","path":"api/models/v0.2/modelResponse.js","position":24,"original_position":24,"commit_id":"1b49f615318fb4478b1d33c59045f53ef11488ba","original_commit_id":"1b49f615318fb4478b1d33c59045f53ef11488ba","user":{"login":"daryanypl","id":18293410,"node_id":"MDQ6VXNlcjE4MjkzNDEw","avatar_url":"https://avatars1.githubusercontent.com/u/18293410?v=4","gravatar_id":"","url":"https://api.github.com/users/daryanypl","html_url":"https://github.com/daryanypl","followers_url":"https://api.github.com/users/daryanypl/followers","following_url":"https://api.github.com/users/daryanypl/following{/other_user}","gists_url":"https://api.github.com/users/daryanypl/gists{/gist_id}","starred_url":"https://api.github.com/users/daryanypl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daryanypl/subscriptions","organizations_url":"https://api.github.com/users/daryanypl/orgs","repos_url":"https://api.github.com/users/daryanypl/repos","events_url":"https://api.github.com/users/daryanypl/events{/privacy}","received_events_url":"https://api.github.com/users/daryanypl/received_events","type":"User","site_admin":false},"body":"If parseInt fails here or on parsing requestData.patronType, then modelPatronCreatorResponse will crash.  Is this the best course of action, or would a try/catch block be called for?","created_at":"2018-07-24T22:02:30Z","updated_at":"2018-07-24T22:03:32Z","html_url":"https://github.com/NYPL/dgx-patron-creator-service/pull/14#discussion_r204926116","pull_request_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/pulls/14","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/pulls/comments/204926116"},"html":{"href":"https://github.com/NYPL/dgx-patron-creator-service/pull/14#discussion_r204926116"},"pull_request":{"href":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/pulls/14"}}},"pull_request":{"url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/pulls/14","id":203316364,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAzMzE2MzY0","html_url":"https://github.com/NYPL/dgx-patron-creator-service/pull/14","diff_url":"https://github.com/NYPL/dgx-patron-creator-service/pull/14.diff","patch_url":"https://github.com/NYPL/dgx-patron-creator-service/pull/14.patch","issue_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/issues/14","number":14,"state":"open","locked":false,"title":"Handle Sierra and environment config errors better MLN-93","user":{"login":"LucasCioffi","id":1825103,"node_id":"MDQ6VXNlcjE4MjUxMDM=","avatar_url":"https://avatars1.githubusercontent.com/u/1825103?v=4","gravatar_id":"","url":"https://api.github.com/users/LucasCioffi","html_url":"https://github.com/LucasCioffi","followers_url":"https://api.github.com/users/LucasCioffi/followers","following_url":"https://api.github.com/users/LucasCioffi/following{/other_user}","gists_url":"https://api.github.com/users/LucasCioffi/gists{/gist_id}","starred_url":"https://api.github.com/users/LucasCioffi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LucasCioffi/subscriptions","organizations_url":"https://api.github.com/users/LucasCioffi/orgs","repos_url":"https://api.github.com/users/LucasCioffi/repos","events_url":"https://api.github.com/users/LucasCioffi/events{/privacy}","received_events_url":"https://api.github.com/users/LucasCioffi/received_events","type":"User","site_admin":false},"body":"New encrypted values for ILS_CLIENT_KEY and ILS_CLIENT_SECRET.\r\n\r\nDRYing up the createPatron v0.2 method and improving error handling in that function, especially for when we cannot connect to Sierra.\r\n\r\nTests for some private methods in createPatron.js.","created_at":"2018-07-23T19:15:56Z","updated_at":"2018-07-24T22:03:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ae6c99bbf99ac3c274c7626eb916159a7cf80b01","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/pulls/14/commits","review_comments_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/pulls/14/comments","review_comment_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/pulls/comments{/number}","comments_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/issues/14/comments","statuses_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/statuses/1b49f615318fb4478b1d33c59045f53ef11488ba","head":{"label":"NYPL:lc_handle_sierra_error","ref":"lc_handle_sierra_error","sha":"1b49f615318fb4478b1d33c59045f53ef11488ba","user":{"login":"NYPL","id":944604,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk0NDYwNA==","avatar_url":"https://avatars1.githubusercontent.com/u/944604?v=4","gravatar_id":"","url":"https://api.github.com/users/NYPL","html_url":"https://github.com/NYPL","followers_url":"https://api.github.com/users/NYPL/followers","following_url":"https://api.github.com/users/NYPL/following{/other_user}","gists_url":"https://api.github.com/users/NYPL/gists{/gist_id}","starred_url":"https://api.github.com/users/NYPL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NYPL/subscriptions","organizations_url":"https://api.github.com/users/NYPL/orgs","repos_url":"https://api.github.com/users/NYPL/repos","events_url":"https://api.github.com/users/NYPL/events{/privacy}","received_events_url":"https://api.github.com/users/NYPL/received_events","type":"Organization","site_admin":false},"repo":{"id":137777829,"node_id":"MDEwOlJlcG9zaXRvcnkxMzc3Nzc4Mjk=","name":"dgx-patron-creator-service","full_name":"NYPL/dgx-patron-creator-service","owner":{"login":"NYPL","id":944604,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk0NDYwNA==","avatar_url":"https://avatars1.githubusercontent.com/u/944604?v=4","gravatar_id":"","url":"https://api.github.com/users/NYPL","html_url":"https://github.com/NYPL","followers_url":"https://api.github.com/users/NYPL/followers","following_url":"https://api.github.com/users/NYPL/following{/other_user}","gists_url":"https://api.github.com/users/NYPL/gists{/gist_id}","starred_url":"https://api.github.com/users/NYPL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NYPL/subscriptions","organizations_url":"https://api.github.com/users/NYPL/orgs","repos_url":"https://api.github.com/users/NYPL/repos","events_url":"https://api.github.com/users/NYPL/events{/privacy}","received_events_url":"https://api.github.com/users/NYPL/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NYPL/dgx-patron-creator-service","description":null,"fork":false,"url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service","forks_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/forks","keys_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/teams","hooks_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/hooks","issue_events_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/issues/events{/number}","events_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/events","assignees_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/assignees{/user}","branches_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/branches{/branch}","tags_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/tags","blobs_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/git/refs{/sha}","trees_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/statuses/{sha}","languages_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/languages","stargazers_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/stargazers","contributors_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/contributors","subscribers_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/subscribers","subscription_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/subscription","commits_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/commits{/sha}","git_commits_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/git/commits{/sha}","comments_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/comments{/number}","issue_comment_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/issues/comments{/number}","contents_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/contents/{+path}","compare_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/merges","archive_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/downloads","issues_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/issues{/number}","pulls_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/pulls{/number}","milestones_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/milestones{/number}","notifications_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/labels{/name}","releases_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/releases{/id}","deployments_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/deployments","created_at":"2018-06-18T16:29:01Z","updated_at":"2018-07-23T19:24:37Z","pushed_at":"2018-07-24T12:41:23Z","git_url":"git://github.com/NYPL/dgx-patron-creator-service.git","ssh_url":"git@github.com:NYPL/dgx-patron-creator-service.git","clone_url":"https://github.com/NYPL/dgx-patron-creator-service.git","svn_url":"https://github.com/NYPL/dgx-patron-creator-service","homepage":null,"size":237,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":0,"open_issues":2,"watchers":0,"default_branch":"development"}},"base":{"label":"NYPL:development","ref":"development","sha":"9b405ef8b4d950a7c5e33c576fc3a6380f52ba14","user":{"login":"NYPL","id":944604,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk0NDYwNA==","avatar_url":"https://avatars1.githubusercontent.com/u/944604?v=4","gravatar_id":"","url":"https://api.github.com/users/NYPL","html_url":"https://github.com/NYPL","followers_url":"https://api.github.com/users/NYPL/followers","following_url":"https://api.github.com/users/NYPL/following{/other_user}","gists_url":"https://api.github.com/users/NYPL/gists{/gist_id}","starred_url":"https://api.github.com/users/NYPL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NYPL/subscriptions","organizations_url":"https://api.github.com/users/NYPL/orgs","repos_url":"https://api.github.com/users/NYPL/repos","events_url":"https://api.github.com/users/NYPL/events{/privacy}","received_events_url":"https://api.github.com/users/NYPL/received_events","type":"Organization","site_admin":false},"repo":{"id":137777829,"node_id":"MDEwOlJlcG9zaXRvcnkxMzc3Nzc4Mjk=","name":"dgx-patron-creator-service","full_name":"NYPL/dgx-patron-creator-service","owner":{"login":"NYPL","id":944604,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk0NDYwNA==","avatar_url":"https://avatars1.githubusercontent.com/u/944604?v=4","gravatar_id":"","url":"https://api.github.com/users/NYPL","html_url":"https://github.com/NYPL","followers_url":"https://api.github.com/users/NYPL/followers","following_url":"https://api.github.com/users/NYPL/following{/other_user}","gists_url":"https://api.github.com/users/NYPL/gists{/gist_id}","starred_url":"https://api.github.com/users/NYPL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NYPL/subscriptions","organizations_url":"https://api.github.com/users/NYPL/orgs","repos_url":"https://api.github.com/users/NYPL/repos","events_url":"https://api.github.com/users/NYPL/events{/privacy}","received_events_url":"https://api.github.com/users/NYPL/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NYPL/dgx-patron-creator-service","description":null,"fork":false,"url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service","forks_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/forks","keys_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/teams","hooks_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/hooks","issue_events_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/issues/events{/number}","events_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/events","assignees_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/assignees{/user}","branches_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/branches{/branch}","tags_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/tags","blobs_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/git/refs{/sha}","trees_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/statuses/{sha}","languages_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/languages","stargazers_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/stargazers","contributors_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/contributors","subscribers_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/subscribers","subscription_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/subscription","commits_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/commits{/sha}","git_commits_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/git/commits{/sha}","comments_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/comments{/number}","issue_comment_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/issues/comments{/number}","contents_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/contents/{+path}","compare_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/merges","archive_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/downloads","issues_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/issues{/number}","pulls_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/pulls{/number}","milestones_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/milestones{/number}","notifications_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/labels{/name}","releases_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/releases{/id}","deployments_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/deployments","created_at":"2018-06-18T16:29:01Z","updated_at":"2018-07-23T19:24:37Z","pushed_at":"2018-07-24T12:41:23Z","git_url":"git://github.com/NYPL/dgx-patron-creator-service.git","ssh_url":"git@github.com:NYPL/dgx-patron-creator-service.git","clone_url":"https://github.com/NYPL/dgx-patron-creator-service.git","svn_url":"https://github.com/NYPL/dgx-patron-creator-service","homepage":null,"size":237,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":0,"open_issues":2,"watchers":0,"default_branch":"development"}},"_links":{"self":{"href":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/pulls/14"},"html":{"href":"https://github.com/NYPL/dgx-patron-creator-service/pull/14"},"issue":{"href":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/issues/14"},"comments":{"href":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/statuses/1b49f615318fb4478b1d33c59045f53ef11488ba"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"daryanypl"}}