{"action":"created","comment":{"url":"https://api.github.com/repos/DFabric/dppm-rest-api/pulls/comments/295986631","pull_request_review_id":252528509,"id":295986631,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI5NTk4NjYzMQ==","diff_hunk":"@@ -0,0 +1,30 @@\n+require \"http\"\n+require \"./exception\"\n+\n+module DppmRestApi\n+  abstract class HTTPStatusError < Exception\n+    abstract def status_code\n+  end\n+\n+  {% for status_code in HTTP::Status.constants %}\n+  {% type_name = status_code.stringify.downcase.camelcase.id %}\n+  # An exception for the {{status_code}} status\n+  class {{type_name.id}} < HTTPStatusError\n+    STATUS_CODE = HTTP::Status::{{status_code}}\n+\n+    def status_code\n+      STATUS_CODE\n+    end\n+\n+    def self.status_code\n+      STATUS_CODE\n+    end","path":"src/errors/http_status_errors.cr","position":21,"original_position":21,"commit_id":"f3c4b356101458c4b34ca4afb5b0a8723294d104","original_commit_id":"f3c4b356101458c4b34ca4afb5b0a8723294d104","user":{"login":"j8r","id":6562667,"node_id":"MDQ6VXNlcjY1NjI2Njc=","avatar_url":"https://avatars0.githubusercontent.com/u/6562667?v=4","gravatar_id":"","url":"https://api.github.com/users/j8r","html_url":"https://github.com/j8r","followers_url":"https://api.github.com/users/j8r/followers","following_url":"https://api.github.com/users/j8r/following{/other_user}","gists_url":"https://api.github.com/users/j8r/gists{/gist_id}","starred_url":"https://api.github.com/users/j8r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/j8r/subscriptions","organizations_url":"https://api.github.com/users/j8r/orgs","repos_url":"https://api.github.com/users/j8r/repos","events_url":"https://api.github.com/users/j8r/events{/privacy}","received_events_url":"https://api.github.com/users/j8r/received_events","type":"User","site_admin":false},"body":"Because one can already use `STATUS_CODE`. Unless you have something against uppercase letters?","created_at":"2019-06-20T20:41:47Z","updated_at":"2019-06-20T20:41:47Z","html_url":"https://github.com/DFabric/dppm-rest-api/pull/20#discussion_r295986631","pull_request_url":"https://api.github.com/repos/DFabric/dppm-rest-api/pulls/20","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/DFabric/dppm-rest-api/pulls/comments/295986631"},"html":{"href":"https://github.com/DFabric/dppm-rest-api/pull/20#discussion_r295986631"},"pull_request":{"href":"https://api.github.com/repos/DFabric/dppm-rest-api/pulls/20"}},"in_reply_to_id":295975881},"pull_request":{"url":"https://api.github.com/repos/DFabric/dppm-rest-api/pulls/20","id":289718829,"node_id":"MDExOlB1bGxSZXF1ZXN0Mjg5NzE4ODI5","html_url":"https://github.com/DFabric/dppm-rest-api/pull/20","diff_url":"https://github.com/DFabric/dppm-rest-api/pull/20.diff","patch_url":"https://github.com/DFabric/dppm-rest-api/pull/20.patch","issue_url":"https://api.github.com/repos/DFabric/dppm-rest-api/issues/20","number":20,"state":"open","locked":false,"title":"Feature/error handling","user":{"login":"dscottboggs","id":7088510,"node_id":"MDQ6VXNlcjcwODg1MTA=","avatar_url":"https://avatars3.githubusercontent.com/u/7088510?v=4","gravatar_id":"","url":"https://api.github.com/users/dscottboggs","html_url":"https://github.com/dscottboggs","followers_url":"https://api.github.com/users/dscottboggs/followers","following_url":"https://api.github.com/users/dscottboggs/following{/other_user}","gists_url":"https://api.github.com/users/dscottboggs/gists{/gist_id}","starred_url":"https://api.github.com/users/dscottboggs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dscottboggs/subscriptions","organizations_url":"https://api.github.com/users/dscottboggs/orgs","repos_url":"https://api.github.com/users/dscottboggs/repos","events_url":"https://api.github.com/users/dscottboggs/events{/privacy}","received_events_url":"https://api.github.com/users/dscottboggs/received_events","type":"User","site_admin":false},"body":"This will resolve #15","created_at":"2019-06-19T13:57:03Z","updated_at":"2019-06-20T20:41:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4780b33f98ac8274d5f555d389e65d0952e75a9a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/DFabric/dppm-rest-api/pulls/20/commits","review_comments_url":"https://api.github.com/repos/DFabric/dppm-rest-api/pulls/20/comments","review_comment_url":"https://api.github.com/repos/DFabric/dppm-rest-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DFabric/dppm-rest-api/issues/20/comments","statuses_url":"https://api.github.com/repos/DFabric/dppm-rest-api/statuses/f3c4b356101458c4b34ca4afb5b0a8723294d104","head":{"label":"DFabric:feature/error-handling","ref":"feature/error-handling","sha":"f3c4b356101458c4b34ca4afb5b0a8723294d104","user":{"login":"DFabric","id":19499073,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5NDk5MDcz","avatar_url":"https://avatars0.githubusercontent.com/u/19499073?v=4","gravatar_id":"","url":"https://api.github.com/users/DFabric","html_url":"https://github.com/DFabric","followers_url":"https://api.github.com/users/DFabric/followers","following_url":"https://api.github.com/users/DFabric/following{/other_user}","gists_url":"https://api.github.com/users/DFabric/gists{/gist_id}","starred_url":"https://api.github.com/users/DFabric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DFabric/subscriptions","organizations_url":"https://api.github.com/users/DFabric/orgs","repos_url":"https://api.github.com/users/DFabric/repos","events_url":"https://api.github.com/users/DFabric/events{/privacy}","received_events_url":"https://api.github.com/users/DFabric/received_events","type":"Organization","site_admin":false},"repo":{"id":173535952,"node_id":"MDEwOlJlcG9zaXRvcnkxNzM1MzU5NTI=","name":"dppm-rest-api","full_name":"DFabric/dppm-rest-api","private":false,"owner":{"login":"DFabric","id":19499073,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5NDk5MDcz","avatar_url":"https://avatars0.githubusercontent.com/u/19499073?v=4","gravatar_id":"","url":"https://api.github.com/users/DFabric","html_url":"https://github.com/DFabric","followers_url":"https://api.github.com/users/DFabric/followers","following_url":"https://api.github.com/users/DFabric/following{/other_user}","gists_url":"https://api.github.com/users/DFabric/gists{/gist_id}","starred_url":"https://api.github.com/users/DFabric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DFabric/subscriptions","organizations_url":"https://api.github.com/users/DFabric/orgs","repos_url":"https://api.github.com/users/DFabric/repos","events_url":"https://api.github.com/users/DFabric/events{/privacy}","received_events_url":"https://api.github.com/users/DFabric/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/DFabric/dppm-rest-api","description":"A REST API in Kemal for interacting with DPPM","fork":false,"url":"https://api.github.com/repos/DFabric/dppm-rest-api","forks_url":"https://api.github.com/repos/DFabric/dppm-rest-api/forks","keys_url":"https://api.github.com/repos/DFabric/dppm-rest-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DFabric/dppm-rest-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DFabric/dppm-rest-api/teams","hooks_url":"https://api.github.com/repos/DFabric/dppm-rest-api/hooks","issue_events_url":"https://api.github.com/repos/DFabric/dppm-rest-api/issues/events{/number}","events_url":"https://api.github.com/repos/DFabric/dppm-rest-api/events","assignees_url":"https://api.github.com/repos/DFabric/dppm-rest-api/assignees{/user}","branches_url":"https://api.github.com/repos/DFabric/dppm-rest-api/branches{/branch}","tags_url":"https://api.github.com/repos/DFabric/dppm-rest-api/tags","blobs_url":"https://api.github.com/repos/DFabric/dppm-rest-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DFabric/dppm-rest-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DFabric/dppm-rest-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/DFabric/dppm-rest-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DFabric/dppm-rest-api/statuses/{sha}","languages_url":"https://api.github.com/repos/DFabric/dppm-rest-api/languages","stargazers_url":"https://api.github.com/repos/DFabric/dppm-rest-api/stargazers","contributors_url":"https://api.github.com/repos/DFabric/dppm-rest-api/contributors","subscribers_url":"https://api.github.com/repos/DFabric/dppm-rest-api/subscribers","subscription_url":"https://api.github.com/repos/DFabric/dppm-rest-api/subscription","commits_url":"https://api.github.com/repos/DFabric/dppm-rest-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/DFabric/dppm-rest-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/DFabric/dppm-rest-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/DFabric/dppm-rest-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/DFabric/dppm-rest-api/contents/{+path}","compare_url":"https://api.github.com/repos/DFabric/dppm-rest-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DFabric/dppm-rest-api/merges","archive_url":"https://api.github.com/repos/DFabric/dppm-rest-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DFabric/dppm-rest-api/downloads","issues_url":"https://api.github.com/repos/DFabric/dppm-rest-api/issues{/number}","pulls_url":"https://api.github.com/repos/DFabric/dppm-rest-api/pulls{/number}","milestones_url":"https://api.github.com/repos/DFabric/dppm-rest-api/milestones{/number}","notifications_url":"https://api.github.com/repos/DFabric/dppm-rest-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DFabric/dppm-rest-api/labels{/name}","releases_url":"https://api.github.com/repos/DFabric/dppm-rest-api/releases{/id}","deployments_url":"https://api.github.com/repos/DFabric/dppm-rest-api/deployments","created_at":"2019-03-03T05:44:47Z","updated_at":"2019-06-18T21:13:22Z","pushed_at":"2019-06-20T19:35:45Z","git_url":"git://github.com/DFabric/dppm-rest-api.git","ssh_url":"git@github.com:DFabric/dppm-rest-api.git","clone_url":"https://github.com/DFabric/dppm-rest-api.git","svn_url":"https://github.com/DFabric/dppm-rest-api","homepage":null,"size":163,"stargazers_count":1,"watchers_count":1,"language":"Crystal","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":4,"license":{"key":"isc","name":"ISC License","spdx_id":"ISC","url":"https://api.github.com/licenses/isc","node_id":"MDc6TGljZW5zZTEw"},"forks":0,"open_issues":4,"watchers":1,"default_branch":"master"}},"base":{"label":"DFabric:master","ref":"master","sha":"36db5d5578a3ab82c6c81e11d5d11f0bf9b7a147","user":{"login":"DFabric","id":19499073,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5NDk5MDcz","avatar_url":"https://avatars0.githubusercontent.com/u/19499073?v=4","gravatar_id":"","url":"https://api.github.com/users/DFabric","html_url":"https://github.com/DFabric","followers_url":"https://api.github.com/users/DFabric/followers","following_url":"https://api.github.com/users/DFabric/following{/other_user}","gists_url":"https://api.github.com/users/DFabric/gists{/gist_id}","starred_url":"https://api.github.com/users/DFabric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DFabric/subscriptions","organizations_url":"https://api.github.com/users/DFabric/orgs","repos_url":"https://api.github.com/users/DFabric/repos","events_url":"https://api.github.com/users/DFabric/events{/privacy}","received_events_url":"https://api.github.com/users/DFabric/received_events","type":"Organization","site_admin":false},"repo":{"id":173535952,"node_id":"MDEwOlJlcG9zaXRvcnkxNzM1MzU5NTI=","name":"dppm-rest-api","full_name":"DFabric/dppm-rest-api","private":false,"owner":{"login":"DFabric","id":19499073,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5NDk5MDcz","avatar_url":"https://avatars0.githubusercontent.com/u/19499073?v=4","gravatar_id":"","url":"https://api.github.com/users/DFabric","html_url":"https://github.com/DFabric","followers_url":"https://api.github.com/users/DFabric/followers","following_url":"https://api.github.com/users/DFabric/following{/other_user}","gists_url":"https://api.github.com/users/DFabric/gists{/gist_id}","starred_url":"https://api.github.com/users/DFabric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DFabric/subscriptions","organizations_url":"https://api.github.com/users/DFabric/orgs","repos_url":"https://api.github.com/users/DFabric/repos","events_url":"https://api.github.com/users/DFabric/events{/privacy}","received_events_url":"https://api.github.com/users/DFabric/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/DFabric/dppm-rest-api","description":"A REST API in Kemal for interacting with DPPM","fork":false,"url":"https://api.github.com/repos/DFabric/dppm-rest-api","forks_url":"https://api.github.com/repos/DFabric/dppm-rest-api/forks","keys_url":"https://api.github.com/repos/DFabric/dppm-rest-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DFabric/dppm-rest-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DFabric/dppm-rest-api/teams","hooks_url":"https://api.github.com/repos/DFabric/dppm-rest-api/hooks","issue_events_url":"https://api.github.com/repos/DFabric/dppm-rest-api/issues/events{/number}","events_url":"https://api.github.com/repos/DFabric/dppm-rest-api/events","assignees_url":"https://api.github.com/repos/DFabric/dppm-rest-api/assignees{/user}","branches_url":"https://api.github.com/repos/DFabric/dppm-rest-api/branches{/branch}","tags_url":"https://api.github.com/repos/DFabric/dppm-rest-api/tags","blobs_url":"https://api.github.com/repos/DFabric/dppm-rest-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DFabric/dppm-rest-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DFabric/dppm-rest-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/DFabric/dppm-rest-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DFabric/dppm-rest-api/statuses/{sha}","languages_url":"https://api.github.com/repos/DFabric/dppm-rest-api/languages","stargazers_url":"https://api.github.com/repos/DFabric/dppm-rest-api/stargazers","contributors_url":"https://api.github.com/repos/DFabric/dppm-rest-api/contributors","subscribers_url":"https://api.github.com/repos/DFabric/dppm-rest-api/subscribers","subscription_url":"https://api.github.com/repos/DFabric/dppm-rest-api/subscription","commits_url":"https://api.github.com/repos/DFabric/dppm-rest-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/DFabric/dppm-rest-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/DFabric/dppm-rest-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/DFabric/dppm-rest-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/DFabric/dppm-rest-api/contents/{+path}","compare_url":"https://api.github.com/repos/DFabric/dppm-rest-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DFabric/dppm-rest-api/merges","archive_url":"https://api.github.com/repos/DFabric/dppm-rest-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DFabric/dppm-rest-api/downloads","issues_url":"https://api.github.com/repos/DFabric/dppm-rest-api/issues{/number}","pulls_url":"https://api.github.com/repos/DFabric/dppm-rest-api/pulls{/number}","milestones_url":"https://api.github.com/repos/DFabric/dppm-rest-api/milestones{/number}","notifications_url":"https://api.github.com/repos/DFabric/dppm-rest-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DFabric/dppm-rest-api/labels{/name}","releases_url":"https://api.github.com/repos/DFabric/dppm-rest-api/releases{/id}","deployments_url":"https://api.github.com/repos/DFabric/dppm-rest-api/deployments","created_at":"2019-03-03T05:44:47Z","updated_at":"2019-06-18T21:13:22Z","pushed_at":"2019-06-20T19:35:45Z","git_url":"git://github.com/DFabric/dppm-rest-api.git","ssh_url":"git@github.com:DFabric/dppm-rest-api.git","clone_url":"https://github.com/DFabric/dppm-rest-api.git","svn_url":"https://github.com/DFabric/dppm-rest-api","homepage":null,"size":163,"stargazers_count":1,"watchers_count":1,"language":"Crystal","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":4,"license":{"key":"isc","name":"ISC License","spdx_id":"ISC","url":"https://api.github.com/licenses/isc","node_id":"MDc6TGljZW5zZTEw"},"forks":0,"open_issues":4,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/DFabric/dppm-rest-api/pulls/20"},"html":{"href":"https://github.com/DFabric/dppm-rest-api/pull/20"},"issue":{"href":"https://api.github.com/repos/DFabric/dppm-rest-api/issues/20"},"comments":{"href":"https://api.github.com/repos/DFabric/dppm-rest-api/issues/20/comments"},"review_comments":{"href":"https://api.github.com/repos/DFabric/dppm-rest-api/pulls/20/comments"},"review_comment":{"href":"https://api.github.com/repos/DFabric/dppm-rest-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DFabric/dppm-rest-api/pulls/20/commits"},"statuses":{"href":"https://api.github.com/repos/DFabric/dppm-rest-api/statuses/f3c4b356101458c4b34ca4afb5b0a8723294d104"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"j8r"}}