{"action":"created","comment":{"url":"https://api.github.com/repos/solarwinds/gitlic-check/pulls/comments/227819688","pull_request_review_id":167947232,"id":227819688,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNzgxOTY4OA==","diff_hunk":"@@ -44,15 +56,17 @@ func ShowUser(ghudb models.GithubUserAccessor) func(w http.ResponseWriter, r *ht\n \t\tuser, err := ghudb.Find(username)\n \t\tif err != nil {\n \t\t\tlog.Printf(\"Failed to find user with email %s. Error: %v\\n\", username, err)\n+\t\t\terrPayload := augit.LogAndFormatError(ERR_DB_RETRIEVAL, \"Could not find user\")\n \t\t\tw.WriteHeader(http.StatusBadGateway)\n-\t\t\tw.Write([]byte(`{\"error\": \"Could not find user\"}`))\n+\t\t\tw.Write(errPayload)\n \t\t\treturn\n \t\t}\n \t\tmarshaledUser, err := json.Marshal(user)\n \t\tif err != nil {\n \t\t\tlog.Printf(\"Failed to marshall user data. Error: %v\\n\", err)","path":"augit/handlers/handlers.go","position":36,"original_position":36,"commit_id":"73d5d288e01cd05c300ef41165733d6b9ad01c74","original_commit_id":"73d5d288e01cd05c300ef41165733d6b9ad01c74","user":{"login":"seubert","id":1221550,"node_id":"MDQ6VXNlcjEyMjE1NTA=","avatar_url":"https://avatars2.githubusercontent.com/u/1221550?v=4","gravatar_id":"","url":"https://api.github.com/users/seubert","html_url":"https://github.com/seubert","followers_url":"https://api.github.com/users/seubert/followers","following_url":"https://api.github.com/users/seubert/following{/other_user}","gists_url":"https://api.github.com/users/seubert/gists{/gist_id}","starred_url":"https://api.github.com/users/seubert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seubert/subscriptions","organizations_url":"https://api.github.com/users/seubert/orgs","repos_url":"https://api.github.com/users/seubert/repos","events_url":"https://api.github.com/users/seubert/events{/privacy}","received_events_url":"https://api.github.com/users/seubert/received_events","type":"User","site_admin":false},"body":"No, I don't want the actual error message from, for example, `json.Marshal` in the response but I do want it logged. Same for database errors. We should (probably) never surface raw errors to the user, but we do want them logged. I could see the argument of removing the logging functionality from `LogAndFormat` but I like having the response message logged as well. Logs are basically free, we should utilize them.","created_at":"2018-10-24T14:41:57Z","updated_at":"2018-10-24T14:41:57Z","html_url":"https://github.com/solarwinds/gitlic-check/pull/23#discussion_r227819688","pull_request_url":"https://api.github.com/repos/solarwinds/gitlic-check/pulls/23","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/solarwinds/gitlic-check/pulls/comments/227819688"},"html":{"href":"https://github.com/solarwinds/gitlic-check/pull/23#discussion_r227819688"},"pull_request":{"href":"https://api.github.com/repos/solarwinds/gitlic-check/pulls/23"}},"in_reply_to_id":227817164},"pull_request":{"url":"https://api.github.com/repos/solarwinds/gitlic-check/pulls/23","id":224839587,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI0ODM5NTg3","html_url":"https://github.com/solarwinds/gitlic-check/pull/23","diff_url":"https://github.com/solarwinds/gitlic-check/pull/23.diff","patch_url":"https://github.com/solarwinds/gitlic-check/pull/23.patch","issue_url":"https://api.github.com/repos/solarwinds/gitlic-check/issues/23","number":23,"state":"open","locked":false,"title":"Add error codes and better logs throughout handlers","user":{"login":"seubert","id":1221550,"node_id":"MDQ6VXNlcjEyMjE1NTA=","avatar_url":"https://avatars2.githubusercontent.com/u/1221550?v=4","gravatar_id":"","url":"https://api.github.com/users/seubert","html_url":"https://github.com/seubert","followers_url":"https://api.github.com/users/seubert/followers","following_url":"https://api.github.com/users/seubert/following{/other_user}","gists_url":"https://api.github.com/users/seubert/gists{/gist_id}","starred_url":"https://api.github.com/users/seubert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seubert/subscriptions","organizations_url":"https://api.github.com/users/seubert/orgs","repos_url":"https://api.github.com/users/seubert/repos","events_url":"https://api.github.com/users/seubert/events{/privacy}","received_events_url":"https://api.github.com/users/seubert/received_events","type":"User","site_admin":false},"body":"Pretty straight-forward expansion of the error code ideas from the offboard command. Gives us easy codes to search logs for and set up alerts based upon.","created_at":"2018-10-22T22:55:50Z","updated_at":"2018-10-24T14:41:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5655dcaf7e41bde504669e9b22261a92352df995","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/solarwinds/gitlic-check/pulls/23/commits","review_comments_url":"https://api.github.com/repos/solarwinds/gitlic-check/pulls/23/comments","review_comment_url":"https://api.github.com/repos/solarwinds/gitlic-check/pulls/comments{/number}","comments_url":"https://api.github.com/repos/solarwinds/gitlic-check/issues/23/comments","statuses_url":"https://api.github.com/repos/solarwinds/gitlic-check/statuses/73d5d288e01cd05c300ef41165733d6b9ad01c74","head":{"label":"solarwinds:error-codes","ref":"error-codes","sha":"73d5d288e01cd05c300ef41165733d6b9ad01c74","user":{"login":"solarwinds","id":12280365,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyMjgwMzY1","avatar_url":"https://avatars3.githubusercontent.com/u/12280365?v=4","gravatar_id":"","url":"https://api.github.com/users/solarwinds","html_url":"https://github.com/solarwinds","followers_url":"https://api.github.com/users/solarwinds/followers","following_url":"https://api.github.com/users/solarwinds/following{/other_user}","gists_url":"https://api.github.com/users/solarwinds/gists{/gist_id}","starred_url":"https://api.github.com/users/solarwinds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/solarwinds/subscriptions","organizations_url":"https://api.github.com/users/solarwinds/orgs","repos_url":"https://api.github.com/users/solarwinds/repos","events_url":"https://api.github.com/users/solarwinds/events{/privacy}","received_events_url":"https://api.github.com/users/solarwinds/received_events","type":"Organization","site_admin":false},"repo":{"id":76666292,"node_id":"MDEwOlJlcG9zaXRvcnk3NjY2NjI5Mg==","name":"gitlic-check","full_name":"solarwinds/gitlic-check","private":false,"owner":{"login":"solarwinds","id":12280365,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyMjgwMzY1","avatar_url":"https://avatars3.githubusercontent.com/u/12280365?v=4","gravatar_id":"","url":"https://api.github.com/users/solarwinds","html_url":"https://github.com/solarwinds","followers_url":"https://api.github.com/users/solarwinds/followers","following_url":"https://api.github.com/users/solarwinds/following{/other_user}","gists_url":"https://api.github.com/users/solarwinds/gists{/gist_id}","starred_url":"https://api.github.com/users/solarwinds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/solarwinds/subscriptions","organizations_url":"https://api.github.com/users/solarwinds/orgs","repos_url":"https://api.github.com/users/solarwinds/repos","events_url":"https://api.github.com/users/solarwinds/events{/privacy}","received_events_url":"https://api.github.com/users/solarwinds/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/solarwinds/gitlic-check","description":"A utility to verify and manage OSS licenses, contribution guidelines, Github organization and repository settings.","fork":false,"url":"https://api.github.com/repos/solarwinds/gitlic-check","forks_url":"https://api.github.com/repos/solarwinds/gitlic-check/forks","keys_url":"https://api.github.com/repos/solarwinds/gitlic-check/keys{/key_id}","collaborators_url":"https://api.github.com/repos/solarwinds/gitlic-check/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/solarwinds/gitlic-check/teams","hooks_url":"https://api.github.com/repos/solarwinds/gitlic-check/hooks","issue_events_url":"https://api.github.com/repos/solarwinds/gitlic-check/issues/events{/number}","events_url":"https://api.github.com/repos/solarwinds/gitlic-check/events","assignees_url":"https://api.github.com/repos/solarwinds/gitlic-check/assignees{/user}","branches_url":"https://api.github.com/repos/solarwinds/gitlic-check/branches{/branch}","tags_url":"https://api.github.com/repos/solarwinds/gitlic-check/tags","blobs_url":"https://api.github.com/repos/solarwinds/gitlic-check/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/solarwinds/gitlic-check/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/solarwinds/gitlic-check/git/refs{/sha}","trees_url":"https://api.github.com/repos/solarwinds/gitlic-check/git/trees{/sha}","statuses_url":"https://api.github.com/repos/solarwinds/gitlic-check/statuses/{sha}","languages_url":"https://api.github.com/repos/solarwinds/gitlic-check/languages","stargazers_url":"https://api.github.com/repos/solarwinds/gitlic-check/stargazers","contributors_url":"https://api.github.com/repos/solarwinds/gitlic-check/contributors","subscribers_url":"https://api.github.com/repos/solarwinds/gitlic-check/subscribers","subscription_url":"https://api.github.com/repos/solarwinds/gitlic-check/subscription","commits_url":"https://api.github.com/repos/solarwinds/gitlic-check/commits{/sha}","git_commits_url":"https://api.github.com/repos/solarwinds/gitlic-check/git/commits{/sha}","comments_url":"https://api.github.com/repos/solarwinds/gitlic-check/comments{/number}","issue_comment_url":"https://api.github.com/repos/solarwinds/gitlic-check/issues/comments{/number}","contents_url":"https://api.github.com/repos/solarwinds/gitlic-check/contents/{+path}","compare_url":"https://api.github.com/repos/solarwinds/gitlic-check/compare/{base}...{head}","merges_url":"https://api.github.com/repos/solarwinds/gitlic-check/merges","archive_url":"https://api.github.com/repos/solarwinds/gitlic-check/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/solarwinds/gitlic-check/downloads","issues_url":"https://api.github.com/repos/solarwinds/gitlic-check/issues{/number}","pulls_url":"https://api.github.com/repos/solarwinds/gitlic-check/pulls{/number}","milestones_url":"https://api.github.com/repos/solarwinds/gitlic-check/milestones{/number}","notifications_url":"https://api.github.com/repos/solarwinds/gitlic-check/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/solarwinds/gitlic-check/labels{/name}","releases_url":"https://api.github.com/repos/solarwinds/gitlic-check/releases{/id}","deployments_url":"https://api.github.com/repos/solarwinds/gitlic-check/deployments","created_at":"2016-12-16T15:57:41Z","updated_at":"2018-10-12T21:25:13Z","pushed_at":"2018-10-24T13:18:20Z","git_url":"git://github.com/solarwinds/gitlic-check.git","ssh_url":"git@github.com:solarwinds/gitlic-check.git","clone_url":"https://github.com/solarwinds/gitlic-check.git","svn_url":"https://github.com/solarwinds/gitlic-check","homepage":"","size":28127,"stargazers_count":0,"watchers_count":0,"language":"Go","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":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"solarwinds:staging","ref":"staging","sha":"4279dfddfd505133947e652d26b01072f1bda9c7","user":{"login":"solarwinds","id":12280365,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyMjgwMzY1","avatar_url":"https://avatars3.githubusercontent.com/u/12280365?v=4","gravatar_id":"","url":"https://api.github.com/users/solarwinds","html_url":"https://github.com/solarwinds","followers_url":"https://api.github.com/users/solarwinds/followers","following_url":"https://api.github.com/users/solarwinds/following{/other_user}","gists_url":"https://api.github.com/users/solarwinds/gists{/gist_id}","starred_url":"https://api.github.com/users/solarwinds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/solarwinds/subscriptions","organizations_url":"https://api.github.com/users/solarwinds/orgs","repos_url":"https://api.github.com/users/solarwinds/repos","events_url":"https://api.github.com/users/solarwinds/events{/privacy}","received_events_url":"https://api.github.com/users/solarwinds/received_events","type":"Organization","site_admin":false},"repo":{"id":76666292,"node_id":"MDEwOlJlcG9zaXRvcnk3NjY2NjI5Mg==","name":"gitlic-check","full_name":"solarwinds/gitlic-check","private":false,"owner":{"login":"solarwinds","id":12280365,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyMjgwMzY1","avatar_url":"https://avatars3.githubusercontent.com/u/12280365?v=4","gravatar_id":"","url":"https://api.github.com/users/solarwinds","html_url":"https://github.com/solarwinds","followers_url":"https://api.github.com/users/solarwinds/followers","following_url":"https://api.github.com/users/solarwinds/following{/other_user}","gists_url":"https://api.github.com/users/solarwinds/gists{/gist_id}","starred_url":"https://api.github.com/users/solarwinds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/solarwinds/subscriptions","organizations_url":"https://api.github.com/users/solarwinds/orgs","repos_url":"https://api.github.com/users/solarwinds/repos","events_url":"https://api.github.com/users/solarwinds/events{/privacy}","received_events_url":"https://api.github.com/users/solarwinds/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/solarwinds/gitlic-check","description":"A utility to verify and manage OSS licenses, contribution guidelines, Github organization and repository settings.","fork":false,"url":"https://api.github.com/repos/solarwinds/gitlic-check","forks_url":"https://api.github.com/repos/solarwinds/gitlic-check/forks","keys_url":"https://api.github.com/repos/solarwinds/gitlic-check/keys{/key_id}","collaborators_url":"https://api.github.com/repos/solarwinds/gitlic-check/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/solarwinds/gitlic-check/teams","hooks_url":"https://api.github.com/repos/solarwinds/gitlic-check/hooks","issue_events_url":"https://api.github.com/repos/solarwinds/gitlic-check/issues/events{/number}","events_url":"https://api.github.com/repos/solarwinds/gitlic-check/events","assignees_url":"https://api.github.com/repos/solarwinds/gitlic-check/assignees{/user}","branches_url":"https://api.github.com/repos/solarwinds/gitlic-check/branches{/branch}","tags_url":"https://api.github.com/repos/solarwinds/gitlic-check/tags","blobs_url":"https://api.github.com/repos/solarwinds/gitlic-check/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/solarwinds/gitlic-check/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/solarwinds/gitlic-check/git/refs{/sha}","trees_url":"https://api.github.com/repos/solarwinds/gitlic-check/git/trees{/sha}","statuses_url":"https://api.github.com/repos/solarwinds/gitlic-check/statuses/{sha}","languages_url":"https://api.github.com/repos/solarwinds/gitlic-check/languages","stargazers_url":"https://api.github.com/repos/solarwinds/gitlic-check/stargazers","contributors_url":"https://api.github.com/repos/solarwinds/gitlic-check/contributors","subscribers_url":"https://api.github.com/repos/solarwinds/gitlic-check/subscribers","subscription_url":"https://api.github.com/repos/solarwinds/gitlic-check/subscription","commits_url":"https://api.github.com/repos/solarwinds/gitlic-check/commits{/sha}","git_commits_url":"https://api.github.com/repos/solarwinds/gitlic-check/git/commits{/sha}","comments_url":"https://api.github.com/repos/solarwinds/gitlic-check/comments{/number}","issue_comment_url":"https://api.github.com/repos/solarwinds/gitlic-check/issues/comments{/number}","contents_url":"https://api.github.com/repos/solarwinds/gitlic-check/contents/{+path}","compare_url":"https://api.github.com/repos/solarwinds/gitlic-check/compare/{base}...{head}","merges_url":"https://api.github.com/repos/solarwinds/gitlic-check/merges","archive_url":"https://api.github.com/repos/solarwinds/gitlic-check/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/solarwinds/gitlic-check/downloads","issues_url":"https://api.github.com/repos/solarwinds/gitlic-check/issues{/number}","pulls_url":"https://api.github.com/repos/solarwinds/gitlic-check/pulls{/number}","milestones_url":"https://api.github.com/repos/solarwinds/gitlic-check/milestones{/number}","notifications_url":"https://api.github.com/repos/solarwinds/gitlic-check/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/solarwinds/gitlic-check/labels{/name}","releases_url":"https://api.github.com/repos/solarwinds/gitlic-check/releases{/id}","deployments_url":"https://api.github.com/repos/solarwinds/gitlic-check/deployments","created_at":"2016-12-16T15:57:41Z","updated_at":"2018-10-12T21:25:13Z","pushed_at":"2018-10-24T13:18:20Z","git_url":"git://github.com/solarwinds/gitlic-check.git","ssh_url":"git@github.com:solarwinds/gitlic-check.git","clone_url":"https://github.com/solarwinds/gitlic-check.git","svn_url":"https://github.com/solarwinds/gitlic-check","homepage":"","size":28127,"stargazers_count":0,"watchers_count":0,"language":"Go","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":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/solarwinds/gitlic-check/pulls/23"},"html":{"href":"https://github.com/solarwinds/gitlic-check/pull/23"},"issue":{"href":"https://api.github.com/repos/solarwinds/gitlic-check/issues/23"},"comments":{"href":"https://api.github.com/repos/solarwinds/gitlic-check/issues/23/comments"},"review_comments":{"href":"https://api.github.com/repos/solarwinds/gitlic-check/pulls/23/comments"},"review_comment":{"href":"https://api.github.com/repos/solarwinds/gitlic-check/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/solarwinds/gitlic-check/pulls/23/commits"},"statuses":{"href":"https://api.github.com/repos/solarwinds/gitlic-check/statuses/73d5d288e01cd05c300ef41165733d6b9ad01c74"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"seubert"}}