{"action":"created","comment":{"url":"https://api.github.com/repos/guardian/zuora-auto-cancel/pulls/comments/211644823","pull_request_review_id":148110130,"id":211644823,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMTY0NDgyMw==","diff_hunk":"@@ -48,4 +50,15 @@ object TypeConvert {\n     }\n   }\n \n+  implicit class TryToClientFailableOp[A](tryValue: Try[A]) extends Logging {\n+    def toClientFailable(action: String) = tryValue match {\n+      case Success(response) => ClientSuccess(response)\n+      case Failure(exception) => {\n+        val errorMessage = s\"exception thrown while trying to $action : ${exception.getMessage}\"","path":"handlers/new-product-api/src/main/scala/com/gu/newproduct/api/addsubscription/TypeConvert.scala","position":24,"original_position":24,"commit_id":"df5412410e495da1efae18696a38e9adc7f3bf71","original_commit_id":"df5412410e495da1efae18696a38e9adc7f3bf71","user":{"login":"johnduffell","id":7304387,"node_id":"MDQ6VXNlcjczMDQzODc=","avatar_url":"https://avatars1.githubusercontent.com/u/7304387?v=4","gravatar_id":"","url":"https://api.github.com/users/johnduffell","html_url":"https://github.com/johnduffell","followers_url":"https://api.github.com/users/johnduffell/followers","following_url":"https://api.github.com/users/johnduffell/following{/other_user}","gists_url":"https://api.github.com/users/johnduffell/gists{/gist_id}","starred_url":"https://api.github.com/users/johnduffell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnduffell/subscriptions","organizations_url":"https://api.github.com/users/johnduffell/orgs","repos_url":"https://api.github.com/users/johnduffell/repos","events_url":"https://api.github.com/users/johnduffell/events{/privacy}","received_events_url":"https://api.github.com/users/johnduffell/received_events","type":"User","site_admin":false},"body":"use toString instead of getMessage so that you get the exception class name as well as the text","created_at":"2018-08-21T15:12:55Z","updated_at":"2018-08-21T15:12:55Z","html_url":"https://github.com/guardian/zuora-auto-cancel/pull/186#discussion_r211644823","pull_request_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/pulls/186","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/guardian/zuora-auto-cancel/pulls/comments/211644823"},"html":{"href":"https://github.com/guardian/zuora-auto-cancel/pull/186#discussion_r211644823"},"pull_request":{"href":"https://api.github.com/repos/guardian/zuora-auto-cancel/pulls/186"}}},"pull_request":{"url":"https://api.github.com/repos/guardian/zuora-auto-cancel/pulls/186","id":209828572,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA5ODI4NTcy","html_url":"https://github.com/guardian/zuora-auto-cancel/pull/186","diff_url":"https://github.com/guardian/zuora-auto-cancel/pull/186.diff","patch_url":"https://github.com/guardian/zuora-auto-cancel/pull/186.patch","issue_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/issues/186","number":186,"state":"open","locked":false,"title":"Get product prices from zuora catalog","user":{"login":"pvighi","id":15324270,"node_id":"MDQ6VXNlcjE1MzI0Mjcw","avatar_url":"https://avatars3.githubusercontent.com/u/15324270?v=4","gravatar_id":"","url":"https://api.github.com/users/pvighi","html_url":"https://github.com/pvighi","followers_url":"https://api.github.com/users/pvighi/followers","following_url":"https://api.github.com/users/pvighi/following{/other_user}","gists_url":"https://api.github.com/users/pvighi/gists{/gist_id}","starred_url":"https://api.github.com/users/pvighi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pvighi/subscriptions","organizations_url":"https://api.github.com/users/pvighi/orgs","repos_url":"https://api.github.com/users/pvighi/repos","events_url":"https://api.github.com/users/pvighi/events{/privacy}","received_events_url":"https://api.github.com/users/pvighi/received_events","type":"User","site_admin":false},"body":"Read the zuora catalog from the catalog-service file in s3 and fetch the prices to return in the new product api /product-catalog response.\r\n\r\nThis PR only loads the prices and relies on hard coded zuora Ids to find them.\r\n \r\nI'm leaving loading Zuora ids from the catalog for later as it is of lower priority. For that we would need to add frontend_id to the voucher plans but we should figure something out to recognise the contribution charge for the amount override (unless we are happy assuming there will only be a single charge)","created_at":"2018-08-21T13:36:52Z","updated_at":"2018-08-21T15:12:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"93629f45e1849d68b5a51728002ab45e493716f2","assignee":null,"assignees":[],"requested_reviewers":[{"login":"jacobwinch","id":19384074,"node_id":"MDQ6VXNlcjE5Mzg0MDc0","avatar_url":"https://avatars3.githubusercontent.com/u/19384074?v=4","gravatar_id":"","url":"https://api.github.com/users/jacobwinch","html_url":"https://github.com/jacobwinch","followers_url":"https://api.github.com/users/jacobwinch/followers","following_url":"https://api.github.com/users/jacobwinch/following{/other_user}","gists_url":"https://api.github.com/users/jacobwinch/gists{/gist_id}","starred_url":"https://api.github.com/users/jacobwinch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacobwinch/subscriptions","organizations_url":"https://api.github.com/users/jacobwinch/orgs","repos_url":"https://api.github.com/users/jacobwinch/repos","events_url":"https://api.github.com/users/jacobwinch/events{/privacy}","received_events_url":"https://api.github.com/users/jacobwinch/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/pulls/186/commits","review_comments_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/pulls/186/comments","review_comment_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/pulls/comments{/number}","comments_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/issues/186/comments","statuses_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/statuses/df5412410e495da1efae18696a38e9adc7f3bf71","head":{"label":"guardian:readS3Catalog","ref":"readS3Catalog","sha":"df5412410e495da1efae18696a38e9adc7f3bf71","user":{"login":"guardian","id":164318,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2NDMxOA==","avatar_url":"https://avatars0.githubusercontent.com/u/164318?v=4","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"repo":{"id":80627505,"node_id":"MDEwOlJlcG9zaXRvcnk4MDYyNzUwNQ==","name":"zuora-auto-cancel","full_name":"guardian/zuora-auto-cancel","owner":{"login":"guardian","id":164318,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2NDMxOA==","avatar_url":"https://avatars0.githubusercontent.com/u/164318?v=4","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/guardian/zuora-auto-cancel","description":"Lambdas covering supporter operations, mostly in life operations","fork":false,"url":"https://api.github.com/repos/guardian/zuora-auto-cancel","forks_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/forks","keys_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/teams","hooks_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/hooks","issue_events_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/issues/events{/number}","events_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/events","assignees_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/assignees{/user}","branches_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/branches{/branch}","tags_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/tags","blobs_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/git/refs{/sha}","trees_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/statuses/{sha}","languages_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/languages","stargazers_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/stargazers","contributors_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/contributors","subscribers_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/subscribers","subscription_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/subscription","commits_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/commits{/sha}","git_commits_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/git/commits{/sha}","comments_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/comments{/number}","issue_comment_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/issues/comments{/number}","contents_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/contents/{+path}","compare_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/merges","archive_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/downloads","issues_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/issues{/number}","pulls_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/pulls{/number}","milestones_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/milestones{/number}","notifications_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/labels{/name}","releases_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/releases{/id}","deployments_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/deployments","created_at":"2017-02-01T14:25:47Z","updated_at":"2018-08-20T12:59:02Z","pushed_at":"2018-08-21T13:36:52Z","git_url":"git://github.com/guardian/zuora-auto-cancel.git","ssh_url":"git@github.com:guardian/zuora-auto-cancel.git","clone_url":"https://github.com/guardian/zuora-auto-cancel.git","svn_url":"https://github.com/guardian/zuora-auto-cancel","homepage":"","size":2243,"stargazers_count":3,"watchers_count":3,"language":"Scala","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":2,"open_issues":2,"watchers":3,"default_branch":"master"}},"base":{"label":"guardian:master","ref":"master","sha":"5fb57ae1e97d2ebb52a516325cb47163045f3e93","user":{"login":"guardian","id":164318,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2NDMxOA==","avatar_url":"https://avatars0.githubusercontent.com/u/164318?v=4","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"repo":{"id":80627505,"node_id":"MDEwOlJlcG9zaXRvcnk4MDYyNzUwNQ==","name":"zuora-auto-cancel","full_name":"guardian/zuora-auto-cancel","owner":{"login":"guardian","id":164318,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2NDMxOA==","avatar_url":"https://avatars0.githubusercontent.com/u/164318?v=4","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/guardian/zuora-auto-cancel","description":"Lambdas covering supporter operations, mostly in life operations","fork":false,"url":"https://api.github.com/repos/guardian/zuora-auto-cancel","forks_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/forks","keys_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/teams","hooks_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/hooks","issue_events_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/issues/events{/number}","events_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/events","assignees_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/assignees{/user}","branches_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/branches{/branch}","tags_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/tags","blobs_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/git/refs{/sha}","trees_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/statuses/{sha}","languages_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/languages","stargazers_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/stargazers","contributors_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/contributors","subscribers_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/subscribers","subscription_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/subscription","commits_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/commits{/sha}","git_commits_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/git/commits{/sha}","comments_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/comments{/number}","issue_comment_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/issues/comments{/number}","contents_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/contents/{+path}","compare_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/merges","archive_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/downloads","issues_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/issues{/number}","pulls_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/pulls{/number}","milestones_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/milestones{/number}","notifications_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/labels{/name}","releases_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/releases{/id}","deployments_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/deployments","created_at":"2017-02-01T14:25:47Z","updated_at":"2018-08-20T12:59:02Z","pushed_at":"2018-08-21T13:36:52Z","git_url":"git://github.com/guardian/zuora-auto-cancel.git","ssh_url":"git@github.com:guardian/zuora-auto-cancel.git","clone_url":"https://github.com/guardian/zuora-auto-cancel.git","svn_url":"https://github.com/guardian/zuora-auto-cancel","homepage":"","size":2243,"stargazers_count":3,"watchers_count":3,"language":"Scala","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":2,"open_issues":2,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/guardian/zuora-auto-cancel/pulls/186"},"html":{"href":"https://github.com/guardian/zuora-auto-cancel/pull/186"},"issue":{"href":"https://api.github.com/repos/guardian/zuora-auto-cancel/issues/186"},"comments":{"href":"https://api.github.com/repos/guardian/zuora-auto-cancel/issues/186/comments"},"review_comments":{"href":"https://api.github.com/repos/guardian/zuora-auto-cancel/pulls/186/comments"},"review_comment":{"href":"https://api.github.com/repos/guardian/zuora-auto-cancel/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/guardian/zuora-auto-cancel/pulls/186/commits"},"statuses":{"href":"https://api.github.com/repos/guardian/zuora-auto-cancel/statuses/df5412410e495da1efae18696a38e9adc7f3bf71"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"johnduffell"}}