{"action":"created","comment":{"url":"https://api.github.com/repos/google/certificate-transparency/pulls/comments/38192076","id":38192076,"diff_hunk":"@@ -112,15 +134,15 @@ CertSubmissionHandler::ProcessPreCertSubmission(PreCertChain* chain,\n   string der_cert;\n   // Nothing should fail anymore as we have validated the chain.\n   if (chain->LeafCert()->DerEncoding(&der_cert) != Cert::TRUE)\n-    return INTERNAL_ERROR;\n+    return Status(util::error::INTERNAL, \"could not DER-encode the chain\");","path":"cpp/log/cert_submission_handler.cc","position":79,"original_position":79,"commit_id":"09942a4f5bb8ef673f6b0ada1e68318d3fbc2123","original_commit_id":"09942a4f5bb8ef673f6b0ada1e68318d3fbc2123","user":{"login":"pphaneuf","id":40400,"avatar_url":"https://avatars.githubusercontent.com/u/40400?v=3","gravatar_id":"","url":"https://api.github.com/users/pphaneuf","html_url":"https://github.com/pphaneuf","followers_url":"https://api.github.com/users/pphaneuf/followers","following_url":"https://api.github.com/users/pphaneuf/following{/other_user}","gists_url":"https://api.github.com/users/pphaneuf/gists{/gist_id}","starred_url":"https://api.github.com/users/pphaneuf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pphaneuf/subscriptions","organizations_url":"https://api.github.com/users/pphaneuf/orgs","repos_url":"https://api.github.com/users/pphaneuf/repos","events_url":"https://api.github.com/users/pphaneuf/events{/privacy}","received_events_url":"https://api.github.com/users/pphaneuf/received_events","type":"User","site_admin":false},"body":"I wouldn't really bother, since `DerEncoding` is going to return a `util::Status` soon, so it'll just be a \"classic\" `Status status(thing()); if (!status.ok) return status;`.","created_at":"2015-08-28T11:48:13Z","updated_at":"2015-08-28T11:48:13Z","html_url":"https://github.com/google/certificate-transparency/pull/891#discussion_r38192076","pull_request_url":"https://api.github.com/repos/google/certificate-transparency/pulls/891","_links":{"self":{"href":"https://api.github.com/repos/google/certificate-transparency/pulls/comments/38192076"},"html":{"href":"https://github.com/google/certificate-transparency/pull/891#discussion_r38192076"},"pull_request":{"href":"https://api.github.com/repos/google/certificate-transparency/pulls/891"}}},"pull_request":{"url":"https://api.github.com/repos/google/certificate-transparency/pulls/891","id":43616851,"html_url":"https://github.com/google/certificate-transparency/pull/891","diff_url":"https://github.com/google/certificate-transparency/pull/891.diff","patch_url":"https://github.com/google/certificate-transparency/pull/891.patch","issue_url":"https://api.github.com/repos/google/certificate-transparency/issues/891","number":891,"state":"open","locked":false,"title":"Replace CertSubmissionHandler::SubmitResult with util::Status.","user":{"login":"pphaneuf","id":40400,"avatar_url":"https://avatars.githubusercontent.com/u/40400?v=3","gravatar_id":"","url":"https://api.github.com/users/pphaneuf","html_url":"https://github.com/pphaneuf","followers_url":"https://api.github.com/users/pphaneuf/followers","following_url":"https://api.github.com/users/pphaneuf/following{/other_user}","gists_url":"https://api.github.com/users/pphaneuf/gists{/gist_id}","starred_url":"https://api.github.com/users/pphaneuf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pphaneuf/subscriptions","organizations_url":"https://api.github.com/users/pphaneuf/orgs","repos_url":"https://api.github.com/users/pphaneuf/repos","events_url":"https://api.github.com/users/pphaneuf/events{/privacy}","received_events_url":"https://api.github.com/users/pphaneuf/received_events","type":"User","site_admin":false},"body":"From the top, allowing to make sure the `util::Status` that comes out is as callers received in the same situation more easily.","created_at":"2015-08-28T11:05:21Z","updated_at":"2015-08-28T11:48:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f1576a12800f2f01a274225f801fa79a68b8503f","assignee":{"login":"Martin2112","id":13366863,"avatar_url":"https://avatars.githubusercontent.com/u/13366863?v=3","gravatar_id":"","url":"https://api.github.com/users/Martin2112","html_url":"https://github.com/Martin2112","followers_url":"https://api.github.com/users/Martin2112/followers","following_url":"https://api.github.com/users/Martin2112/following{/other_user}","gists_url":"https://api.github.com/users/Martin2112/gists{/gist_id}","starred_url":"https://api.github.com/users/Martin2112/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Martin2112/subscriptions","organizations_url":"https://api.github.com/users/Martin2112/orgs","repos_url":"https://api.github.com/users/Martin2112/repos","events_url":"https://api.github.com/users/Martin2112/events{/privacy}","received_events_url":"https://api.github.com/users/Martin2112/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/google/certificate-transparency/pulls/891/commits","review_comments_url":"https://api.github.com/repos/google/certificate-transparency/pulls/891/comments","review_comment_url":"https://api.github.com/repos/google/certificate-transparency/pulls/comments{/number}","comments_url":"https://api.github.com/repos/google/certificate-transparency/issues/891/comments","statuses_url":"https://api.github.com/repos/google/certificate-transparency/statuses/09942a4f5bb8ef673f6b0ada1e68318d3fbc2123","head":{"label":"pphaneuf:cleanup_1","ref":"cleanup_1","sha":"09942a4f5bb8ef673f6b0ada1e68318d3fbc2123","user":{"login":"pphaneuf","id":40400,"avatar_url":"https://avatars.githubusercontent.com/u/40400?v=3","gravatar_id":"","url":"https://api.github.com/users/pphaneuf","html_url":"https://github.com/pphaneuf","followers_url":"https://api.github.com/users/pphaneuf/followers","following_url":"https://api.github.com/users/pphaneuf/following{/other_user}","gists_url":"https://api.github.com/users/pphaneuf/gists{/gist_id}","starred_url":"https://api.github.com/users/pphaneuf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pphaneuf/subscriptions","organizations_url":"https://api.github.com/users/pphaneuf/orgs","repos_url":"https://api.github.com/users/pphaneuf/repos","events_url":"https://api.github.com/users/pphaneuf/events{/privacy}","received_events_url":"https://api.github.com/users/pphaneuf/received_events","type":"User","site_admin":false},"repo":{"id":19991870,"name":"certificate-transparency","full_name":"pphaneuf/certificate-transparency","owner":{"login":"pphaneuf","id":40400,"avatar_url":"https://avatars.githubusercontent.com/u/40400?v=3","gravatar_id":"","url":"https://api.github.com/users/pphaneuf","html_url":"https://github.com/pphaneuf","followers_url":"https://api.github.com/users/pphaneuf/followers","following_url":"https://api.github.com/users/pphaneuf/following{/other_user}","gists_url":"https://api.github.com/users/pphaneuf/gists{/gist_id}","starred_url":"https://api.github.com/users/pphaneuf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pphaneuf/subscriptions","organizations_url":"https://api.github.com/users/pphaneuf/orgs","repos_url":"https://api.github.com/users/pphaneuf/repos","events_url":"https://api.github.com/users/pphaneuf/events{/privacy}","received_events_url":"https://api.github.com/users/pphaneuf/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pphaneuf/certificate-transparency","description":"Auditing for TLS certificates.","fork":true,"url":"https://api.github.com/repos/pphaneuf/certificate-transparency","forks_url":"https://api.github.com/repos/pphaneuf/certificate-transparency/forks","keys_url":"https://api.github.com/repos/pphaneuf/certificate-transparency/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pphaneuf/certificate-transparency/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pphaneuf/certificate-transparency/teams","hooks_url":"https://api.github.com/repos/pphaneuf/certificate-transparency/hooks","issue_events_url":"https://api.github.com/repos/pphaneuf/certificate-transparency/issues/events{/number}","events_url":"https://api.github.com/repos/pphaneuf/certificate-transparency/events","assignees_url":"https://api.github.com/repos/pphaneuf/certificate-transparency/assignees{/user}","branches_url":"https://api.github.com/repos/pphaneuf/certificate-transparency/branches{/branch}","tags_url":"https://api.github.com/repos/pphaneuf/certificate-transparency/tags","blobs_url":"https://api.github.com/repos/pphaneuf/certificate-transparency/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pphaneuf/certificate-transparency/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pphaneuf/certificate-transparency/git/refs{/sha}","trees_url":"https://api.github.com/repos/pphaneuf/certificate-transparency/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pphaneuf/certificate-transparency/statuses/{sha}","languages_url":"https://api.github.com/repos/pphaneuf/certificate-transparency/languages","stargazers_url":"https://api.github.com/repos/pphaneuf/certificate-transparency/stargazers","contributors_url":"https://api.github.com/repos/pphaneuf/certificate-transparency/contributors","subscribers_url":"https://api.github.com/repos/pphaneuf/certificate-transparency/subscribers","subscription_url":"https://api.github.com/repos/pphaneuf/certificate-transparency/subscription","commits_url":"https://api.github.com/repos/pphaneuf/certificate-transparency/commits{/sha}","git_commits_url":"https://api.github.com/repos/pphaneuf/certificate-transparency/git/commits{/sha}","comments_url":"https://api.github.com/repos/pphaneuf/certificate-transparency/comments{/number}","issue_comment_url":"https://api.github.com/repos/pphaneuf/certificate-transparency/issues/comments{/number}","contents_url":"https://api.github.com/repos/pphaneuf/certificate-transparency/contents/{+path}","compare_url":"https://api.github.com/repos/pphaneuf/certificate-transparency/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pphaneuf/certificate-transparency/merges","archive_url":"https://api.github.com/repos/pphaneuf/certificate-transparency/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pphaneuf/certificate-transparency/downloads","issues_url":"https://api.github.com/repos/pphaneuf/certificate-transparency/issues{/number}","pulls_url":"https://api.github.com/repos/pphaneuf/certificate-transparency/pulls{/number}","milestones_url":"https://api.github.com/repos/pphaneuf/certificate-transparency/milestones{/number}","notifications_url":"https://api.github.com/repos/pphaneuf/certificate-transparency/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pphaneuf/certificate-transparency/labels{/name}","releases_url":"https://api.github.com/repos/pphaneuf/certificate-transparency/releases{/id}","created_at":"2014-05-20T18:11:01Z","updated_at":"2015-05-08T17:19:39Z","pushed_at":"2015-08-28T11:01:44Z","git_url":"git://github.com/pphaneuf/certificate-transparency.git","ssh_url":"git@github.com:pphaneuf/certificate-transparency.git","clone_url":"https://github.com/pphaneuf/certificate-transparency.git","svn_url":"https://github.com/pphaneuf/certificate-transparency","homepage":"http://www.certificate-transparency.org/","size":25092,"stargazers_count":1,"watchers_count":1,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"google:master","ref":"master","sha":"345c8e1c8e1ab27905a507560cd68c3cbe8f7bdc","user":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"repo":{"id":19989605,"name":"certificate-transparency","full_name":"google/certificate-transparency","owner":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/google/certificate-transparency","description":"Auditing for TLS certificates.","fork":false,"url":"https://api.github.com/repos/google/certificate-transparency","forks_url":"https://api.github.com/repos/google/certificate-transparency/forks","keys_url":"https://api.github.com/repos/google/certificate-transparency/keys{/key_id}","collaborators_url":"https://api.github.com/repos/google/certificate-transparency/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/google/certificate-transparency/teams","hooks_url":"https://api.github.com/repos/google/certificate-transparency/hooks","issue_events_url":"https://api.github.com/repos/google/certificate-transparency/issues/events{/number}","events_url":"https://api.github.com/repos/google/certificate-transparency/events","assignees_url":"https://api.github.com/repos/google/certificate-transparency/assignees{/user}","branches_url":"https://api.github.com/repos/google/certificate-transparency/branches{/branch}","tags_url":"https://api.github.com/repos/google/certificate-transparency/tags","blobs_url":"https://api.github.com/repos/google/certificate-transparency/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/google/certificate-transparency/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/google/certificate-transparency/git/refs{/sha}","trees_url":"https://api.github.com/repos/google/certificate-transparency/git/trees{/sha}","statuses_url":"https://api.github.com/repos/google/certificate-transparency/statuses/{sha}","languages_url":"https://api.github.com/repos/google/certificate-transparency/languages","stargazers_url":"https://api.github.com/repos/google/certificate-transparency/stargazers","contributors_url":"https://api.github.com/repos/google/certificate-transparency/contributors","subscribers_url":"https://api.github.com/repos/google/certificate-transparency/subscribers","subscription_url":"https://api.github.com/repos/google/certificate-transparency/subscription","commits_url":"https://api.github.com/repos/google/certificate-transparency/commits{/sha}","git_commits_url":"https://api.github.com/repos/google/certificate-transparency/git/commits{/sha}","comments_url":"https://api.github.com/repos/google/certificate-transparency/comments{/number}","issue_comment_url":"https://api.github.com/repos/google/certificate-transparency/issues/comments{/number}","contents_url":"https://api.github.com/repos/google/certificate-transparency/contents/{+path}","compare_url":"https://api.github.com/repos/google/certificate-transparency/compare/{base}...{head}","merges_url":"https://api.github.com/repos/google/certificate-transparency/merges","archive_url":"https://api.github.com/repos/google/certificate-transparency/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/google/certificate-transparency/downloads","issues_url":"https://api.github.com/repos/google/certificate-transparency/issues{/number}","pulls_url":"https://api.github.com/repos/google/certificate-transparency/pulls{/number}","milestones_url":"https://api.github.com/repos/google/certificate-transparency/milestones{/number}","notifications_url":"https://api.github.com/repos/google/certificate-transparency/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/google/certificate-transparency/labels{/name}","releases_url":"https://api.github.com/repos/google/certificate-transparency/releases{/id}","created_at":"2014-05-20T17:03:47Z","updated_at":"2015-08-25T15:41:51Z","pushed_at":"2015-08-28T11:05:22Z","git_url":"git://github.com/google/certificate-transparency.git","ssh_url":"git@github.com:google/certificate-transparency.git","clone_url":"https://github.com/google/certificate-transparency.git","svn_url":"https://github.com/google/certificate-transparency","homepage":"http://www.certificate-transparency.org/","size":24876,"stargazers_count":152,"watchers_count":152,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":56,"mirror_url":null,"open_issues_count":56,"forks":56,"open_issues":56,"watchers":152,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/google/certificate-transparency/pulls/891"},"html":{"href":"https://github.com/google/certificate-transparency/pull/891"},"issue":{"href":"https://api.github.com/repos/google/certificate-transparency/issues/891"},"comments":{"href":"https://api.github.com/repos/google/certificate-transparency/issues/891/comments"},"review_comments":{"href":"https://api.github.com/repos/google/certificate-transparency/pulls/891/comments"},"review_comment":{"href":"https://api.github.com/repos/google/certificate-transparency/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/google/certificate-transparency/pulls/891/commits"},"statuses":{"href":"https://api.github.com/repos/google/certificate-transparency/statuses/09942a4f5bb8ef673f6b0ada1e68318d3fbc2123"}}}}