{"action":"created","comment":{"url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/pulls/comments/215020178","pull_request_review_id":152195618,"id":215020178,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNTAyMDE3OA==","diff_hunk":"@@ -96,7 +96,7 @@ function modelErrorResponseData(obj) {\n     detail: {\n       title: obj.title || '',\n       debug: (obj.debug_message) ? parseJSON(obj.debug_message) : {},\n-    }\n+    },","path":"api/models/v0.2/modelResponse.js","position":5,"original_position":5,"commit_id":"c9c336348a42eeeef1344206d1fca6ab5ea2acb3","original_commit_id":"c9c336348a42eeeef1344206d1fca6ab5ea2acb3","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":"This extra comma is required by ESLint.","created_at":"2018-09-04T18:27:44Z","updated_at":"2018-09-04T18:27:45Z","html_url":"https://github.com/NYPL/dgx-patron-creator-service/pull/30#discussion_r215020178","pull_request_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/pulls/30","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/pulls/comments/215020178"},"html":{"href":"https://github.com/NYPL/dgx-patron-creator-service/pull/30#discussion_r215020178"},"pull_request":{"href":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/pulls/30"}}},"pull_request":{"url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/pulls/30","id":213063599,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEzMDYzNTk5","html_url":"https://github.com/NYPL/dgx-patron-creator-service/pull/30","diff_url":"https://github.com/NYPL/dgx-patron-creator-service/pull/30.diff","patch_url":"https://github.com/NYPL/dgx-patron-creator-service/pull/30.patch","issue_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/issues/30","number":30,"state":"open","locked":false,"title":"Better logging messages MLN-238","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":"Task #1: Remove the \"data\" wrapper from the v2 error messages \r\n\r\n## PREVIOUS v0.2 ERROR MESSAGE:\r\n\r\n```\r\n{\r\n    \"data\": {\r\n        \"status_code_from_card_creator\": null,\r\n        \"status_code_from_card_ils\": null,\r\n        \"type\": \"invalid-request\",\r\n        \"message\": \"Error with this request body: abc\",\r\n        \"detail\": {}\r\n    },\r\n    \"count\": 0\r\n}\r\n```\r\n\r\n## NEW v0.2 ERROR MESSAGE:\r\n\r\n```{\r\n    \"status_code_from_card_ils\": null,\r\n    \"status\": 400,\r\n    \"type\": \"invalid-request-to-patron-creator\",\r\n    \"message\": \"Request body: abc\",\r\n    \"detail\": \"The patron creator did not forward the request to the ILS.\"\r\n}\r\n```\r\n\r\nTask #2: Display a 503 on the v0.1 route if that's what Card Creator returns\r\nExample 503 URL: http://www.mocky.io/v2/5b8e8c6d3200003d177b39fe\r\n\r\n## BEFORE\r\n\r\n```\r\n{\r\n    \"data\": {\r\n        \"simplePatron\": {\r\n            \"status_code_from_card_creator\": null,\r\n            \"type\": \"\",\r\n            \"message\": \"\",\r\n            \"detail\": {\r\n                \"title\": \"\",\r\n                \"debug\": {}\r\n            }\r\n        },\r\n        \"patron\": null\r\n    },\r\n    \"count\": 0\r\n}\r\n```\r\n\r\n## AFTER\r\n\r\n```\r\n{\r\n    \"data\": {\r\n        \"simplePatron\": {\r\n            \"status_code_from_card_creator\": 503,\r\n            \"type\": \"\",\r\n            \"message\": \"\",\r\n            \"detail\": {\r\n                \"title\": \"\",\r\n                \"debug\": \"Request failed with status code 503 from NYPL Simplified Card Creator.\"\r\n            }\r\n        },\r\n        \"patron\": null\r\n    },\r\n    \"count\": 0\r\n}\r\n```","created_at":"2018-09-04T18:23:55Z","updated_at":"2018-09-04T18:27:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ceca3c6c00f4a8026321ec183075e9edc1b79c97","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/pulls/30/commits","review_comments_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/pulls/30/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/30/comments","statuses_url":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/statuses/c9c336348a42eeeef1344206d1fca6ab5ea2acb3","head":{"label":"NYPL:lc_error_logging","ref":"lc_error_logging","sha":"c9c336348a42eeeef1344206d1fca6ab5ea2acb3","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-08-29T17:32:03Z","pushed_at":"2018-09-04T18:23:56Z","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":260,"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":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"development"}},"base":{"label":"NYPL:development","ref":"development","sha":"090e11d361ac115eae8214dada584acdcd34240e","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-08-29T17:32:03Z","pushed_at":"2018-09-04T18:23:56Z","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":260,"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":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"development"}},"_links":{"self":{"href":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/pulls/30"},"html":{"href":"https://github.com/NYPL/dgx-patron-creator-service/pull/30"},"issue":{"href":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/issues/30"},"comments":{"href":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/issues/30/comments"},"review_comments":{"href":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/pulls/30/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/30/commits"},"statuses":{"href":"https://api.github.com/repos/NYPL/dgx-patron-creator-service/statuses/c9c336348a42eeeef1344206d1fca6ab5ea2acb3"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"LucasCioffi"}}