{"action":"created","comment":{"url":"https://api.github.com/repos/dcos/cosmos/pulls/comments/64286066","id":64286066,"diff_hunk":"@@ -137,6 +140,23 @@ object Encoders {\n     Base64.getEncoder.encodeToString(ByteBuffers.getBytes(bb)).asJson\n   }\n \n+  implicit val encodeThrowable: Encoder[Throwable] = Encoder.instance(_.getMessage.asJson)","path":"cosmos-server/src/main/scala/com/mesosphere/cosmos/circe/Encoders.scala","position":23,"original_position":23,"commit_id":"645f8a5cb1a2b0cbd92f90a7fc255332d5635694","original_commit_id":"91016a2e1a16384d48e42aaef49458b855fc13ad","user":{"login":"cruhland","id":1936682,"avatar_url":"https://avatars.githubusercontent.com/u/1936682?v=3","gravatar_id":"","url":"https://api.github.com/users/cruhland","html_url":"https://github.com/cruhland","followers_url":"https://api.github.com/users/cruhland/followers","following_url":"https://api.github.com/users/cruhland/following{/other_user}","gists_url":"https://api.github.com/users/cruhland/gists{/gist_id}","starred_url":"https://api.github.com/users/cruhland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cruhland/subscriptions","organizations_url":"https://api.github.com/users/cruhland/orgs","repos_url":"https://api.github.com/users/cruhland/repos","events_url":"https://api.github.com/users/cruhland/events{/privacy}","received_events_url":"https://api.github.com/users/cruhland/received_events","type":"User","site_admin":false},"body":"I could write a custom encoder for `CosmosError` based on this SO answer from Travis Brown: http://stackoverflow.com/questions/37011894/circe-instances-for-encoding-decoding-sealed-trait-instances-of-arity-0/37015184#37015184\r\n\r\nI'll look into it when I have time this week.","created_at":"2016-05-23T20:48:33Z","updated_at":"2016-05-23T20:48:33Z","html_url":"https://github.com/dcos/cosmos/pull/341#discussion_r64286066","pull_request_url":"https://api.github.com/repos/dcos/cosmos/pulls/341","_links":{"self":{"href":"https://api.github.com/repos/dcos/cosmos/pulls/comments/64286066"},"html":{"href":"https://github.com/dcos/cosmos/pull/341#discussion_r64286066"},"pull_request":{"href":"https://api.github.com/repos/dcos/cosmos/pulls/341"}}},"pull_request":{"url":"https://api.github.com/repos/dcos/cosmos/pulls/341","id":70791578,"html_url":"https://github.com/dcos/cosmos/pull/341","diff_url":"https://github.com/dcos/cosmos/pull/341.diff","patch_url":"https://github.com/dcos/cosmos/pull/341.patch","issue_url":"https://api.github.com/repos/dcos/cosmos/issues/341","number":341,"state":"open","locked":false,"title":"Include all CosmosError subclass arguments in \"data\" field of response","user":{"login":"cruhland","id":1936682,"avatar_url":"https://avatars.githubusercontent.com/u/1936682?v=3","gravatar_id":"","url":"https://api.github.com/users/cruhland","html_url":"https://github.com/cruhland","followers_url":"https://api.github.com/users/cruhland/followers","following_url":"https://api.github.com/users/cruhland/following{/other_user}","gists_url":"https://api.github.com/users/cruhland/gists{/gist_id}","starred_url":"https://api.github.com/users/cruhland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cruhland/subscriptions","organizations_url":"https://api.github.com/users/cruhland/orgs","repos_url":"https://api.github.com/users/cruhland/repos","events_url":"https://api.github.com/users/cruhland/events{/privacy}","received_events_url":"https://api.github.com/users/cruhland/received_events","type":"User","site_admin":false},"body":"Provides a default implementation of CosmosError.getData which uses\r\ngenerated Circe Encoders to create a JSON representation of any\r\ninstance. Subclasses can still override the default if needed.\r\n\r\nFixes #312.","created_at":"2016-05-20T01:55:17Z","updated_at":"2016-05-23T20:48:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"de2c60a4440512e09c15231cc65b25274f2cb6fb","assignee":{"login":"cruhland","id":1936682,"avatar_url":"https://avatars.githubusercontent.com/u/1936682?v=3","gravatar_id":"","url":"https://api.github.com/users/cruhland","html_url":"https://github.com/cruhland","followers_url":"https://api.github.com/users/cruhland/followers","following_url":"https://api.github.com/users/cruhland/following{/other_user}","gists_url":"https://api.github.com/users/cruhland/gists{/gist_id}","starred_url":"https://api.github.com/users/cruhland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cruhland/subscriptions","organizations_url":"https://api.github.com/users/cruhland/orgs","repos_url":"https://api.github.com/users/cruhland/repos","events_url":"https://api.github.com/users/cruhland/events{/privacy}","received_events_url":"https://api.github.com/users/cruhland/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/dcos/cosmos/pulls/341/commits","review_comments_url":"https://api.github.com/repos/dcos/cosmos/pulls/341/comments","review_comment_url":"https://api.github.com/repos/dcos/cosmos/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dcos/cosmos/issues/341/comments","statuses_url":"https://api.github.com/repos/dcos/cosmos/statuses/645f8a5cb1a2b0cbd92f90a7fc255332d5635694","head":{"label":"dcos:generate-error-data-#312","ref":"generate-error-data-#312","sha":"645f8a5cb1a2b0cbd92f90a7fc255332d5635694","user":{"login":"dcos","id":17648048,"avatar_url":"https://avatars.githubusercontent.com/u/17648048?v=3","gravatar_id":"","url":"https://api.github.com/users/dcos","html_url":"https://github.com/dcos","followers_url":"https://api.github.com/users/dcos/followers","following_url":"https://api.github.com/users/dcos/following{/other_user}","gists_url":"https://api.github.com/users/dcos/gists{/gist_id}","starred_url":"https://api.github.com/users/dcos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcos/subscriptions","organizations_url":"https://api.github.com/users/dcos/orgs","repos_url":"https://api.github.com/users/dcos/repos","events_url":"https://api.github.com/users/dcos/events{/privacy}","received_events_url":"https://api.github.com/users/dcos/received_events","type":"Organization","site_admin":false},"repo":{"id":47585661,"name":"cosmos","full_name":"dcos/cosmos","owner":{"login":"dcos","id":17648048,"avatar_url":"https://avatars.githubusercontent.com/u/17648048?v=3","gravatar_id":"","url":"https://api.github.com/users/dcos","html_url":"https://github.com/dcos","followers_url":"https://api.github.com/users/dcos/followers","following_url":"https://api.github.com/users/dcos/following{/other_user}","gists_url":"https://api.github.com/users/dcos/gists{/gist_id}","starred_url":"https://api.github.com/users/dcos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcos/subscriptions","organizations_url":"https://api.github.com/users/dcos/orgs","repos_url":"https://api.github.com/users/dcos/repos","events_url":"https://api.github.com/users/dcos/events{/privacy}","received_events_url":"https://api.github.com/users/dcos/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dcos/cosmos","description":"An orderly, harmonius, complete system for DC/OS - package management","fork":false,"url":"https://api.github.com/repos/dcos/cosmos","forks_url":"https://api.github.com/repos/dcos/cosmos/forks","keys_url":"https://api.github.com/repos/dcos/cosmos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dcos/cosmos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dcos/cosmos/teams","hooks_url":"https://api.github.com/repos/dcos/cosmos/hooks","issue_events_url":"https://api.github.com/repos/dcos/cosmos/issues/events{/number}","events_url":"https://api.github.com/repos/dcos/cosmos/events","assignees_url":"https://api.github.com/repos/dcos/cosmos/assignees{/user}","branches_url":"https://api.github.com/repos/dcos/cosmos/branches{/branch}","tags_url":"https://api.github.com/repos/dcos/cosmos/tags","blobs_url":"https://api.github.com/repos/dcos/cosmos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dcos/cosmos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dcos/cosmos/git/refs{/sha}","trees_url":"https://api.github.com/repos/dcos/cosmos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dcos/cosmos/statuses/{sha}","languages_url":"https://api.github.com/repos/dcos/cosmos/languages","stargazers_url":"https://api.github.com/repos/dcos/cosmos/stargazers","contributors_url":"https://api.github.com/repos/dcos/cosmos/contributors","subscribers_url":"https://api.github.com/repos/dcos/cosmos/subscribers","subscription_url":"https://api.github.com/repos/dcos/cosmos/subscription","commits_url":"https://api.github.com/repos/dcos/cosmos/commits{/sha}","git_commits_url":"https://api.github.com/repos/dcos/cosmos/git/commits{/sha}","comments_url":"https://api.github.com/repos/dcos/cosmos/comments{/number}","issue_comment_url":"https://api.github.com/repos/dcos/cosmos/issues/comments{/number}","contents_url":"https://api.github.com/repos/dcos/cosmos/contents/{+path}","compare_url":"https://api.github.com/repos/dcos/cosmos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dcos/cosmos/merges","archive_url":"https://api.github.com/repos/dcos/cosmos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dcos/cosmos/downloads","issues_url":"https://api.github.com/repos/dcos/cosmos/issues{/number}","pulls_url":"https://api.github.com/repos/dcos/cosmos/pulls{/number}","milestones_url":"https://api.github.com/repos/dcos/cosmos/milestones{/number}","notifications_url":"https://api.github.com/repos/dcos/cosmos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dcos/cosmos/labels{/name}","releases_url":"https://api.github.com/repos/dcos/cosmos/releases{/id}","deployments_url":"https://api.github.com/repos/dcos/cosmos/deployments","created_at":"2015-12-07T23:23:49Z","updated_at":"2016-05-23T15:33:17Z","pushed_at":"2016-05-23T20:34:01Z","git_url":"git://github.com/dcos/cosmos.git","ssh_url":"git@github.com:dcos/cosmos.git","clone_url":"https://github.com/dcos/cosmos.git","svn_url":"https://github.com/dcos/cosmos","homepage":"","size":509,"stargazers_count":20,"watchers_count":20,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":96,"forks":2,"open_issues":96,"watchers":20,"default_branch":"master"}},"base":{"label":"dcos:master","ref":"master","sha":"14abcbec8494573938f723eba3101afd5a5f79bd","user":{"login":"dcos","id":17648048,"avatar_url":"https://avatars.githubusercontent.com/u/17648048?v=3","gravatar_id":"","url":"https://api.github.com/users/dcos","html_url":"https://github.com/dcos","followers_url":"https://api.github.com/users/dcos/followers","following_url":"https://api.github.com/users/dcos/following{/other_user}","gists_url":"https://api.github.com/users/dcos/gists{/gist_id}","starred_url":"https://api.github.com/users/dcos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcos/subscriptions","organizations_url":"https://api.github.com/users/dcos/orgs","repos_url":"https://api.github.com/users/dcos/repos","events_url":"https://api.github.com/users/dcos/events{/privacy}","received_events_url":"https://api.github.com/users/dcos/received_events","type":"Organization","site_admin":false},"repo":{"id":47585661,"name":"cosmos","full_name":"dcos/cosmos","owner":{"login":"dcos","id":17648048,"avatar_url":"https://avatars.githubusercontent.com/u/17648048?v=3","gravatar_id":"","url":"https://api.github.com/users/dcos","html_url":"https://github.com/dcos","followers_url":"https://api.github.com/users/dcos/followers","following_url":"https://api.github.com/users/dcos/following{/other_user}","gists_url":"https://api.github.com/users/dcos/gists{/gist_id}","starred_url":"https://api.github.com/users/dcos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcos/subscriptions","organizations_url":"https://api.github.com/users/dcos/orgs","repos_url":"https://api.github.com/users/dcos/repos","events_url":"https://api.github.com/users/dcos/events{/privacy}","received_events_url":"https://api.github.com/users/dcos/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dcos/cosmos","description":"An orderly, harmonius, complete system for DC/OS - package management","fork":false,"url":"https://api.github.com/repos/dcos/cosmos","forks_url":"https://api.github.com/repos/dcos/cosmos/forks","keys_url":"https://api.github.com/repos/dcos/cosmos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dcos/cosmos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dcos/cosmos/teams","hooks_url":"https://api.github.com/repos/dcos/cosmos/hooks","issue_events_url":"https://api.github.com/repos/dcos/cosmos/issues/events{/number}","events_url":"https://api.github.com/repos/dcos/cosmos/events","assignees_url":"https://api.github.com/repos/dcos/cosmos/assignees{/user}","branches_url":"https://api.github.com/repos/dcos/cosmos/branches{/branch}","tags_url":"https://api.github.com/repos/dcos/cosmos/tags","blobs_url":"https://api.github.com/repos/dcos/cosmos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dcos/cosmos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dcos/cosmos/git/refs{/sha}","trees_url":"https://api.github.com/repos/dcos/cosmos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dcos/cosmos/statuses/{sha}","languages_url":"https://api.github.com/repos/dcos/cosmos/languages","stargazers_url":"https://api.github.com/repos/dcos/cosmos/stargazers","contributors_url":"https://api.github.com/repos/dcos/cosmos/contributors","subscribers_url":"https://api.github.com/repos/dcos/cosmos/subscribers","subscription_url":"https://api.github.com/repos/dcos/cosmos/subscription","commits_url":"https://api.github.com/repos/dcos/cosmos/commits{/sha}","git_commits_url":"https://api.github.com/repos/dcos/cosmos/git/commits{/sha}","comments_url":"https://api.github.com/repos/dcos/cosmos/comments{/number}","issue_comment_url":"https://api.github.com/repos/dcos/cosmos/issues/comments{/number}","contents_url":"https://api.github.com/repos/dcos/cosmos/contents/{+path}","compare_url":"https://api.github.com/repos/dcos/cosmos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dcos/cosmos/merges","archive_url":"https://api.github.com/repos/dcos/cosmos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dcos/cosmos/downloads","issues_url":"https://api.github.com/repos/dcos/cosmos/issues{/number}","pulls_url":"https://api.github.com/repos/dcos/cosmos/pulls{/number}","milestones_url":"https://api.github.com/repos/dcos/cosmos/milestones{/number}","notifications_url":"https://api.github.com/repos/dcos/cosmos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dcos/cosmos/labels{/name}","releases_url":"https://api.github.com/repos/dcos/cosmos/releases{/id}","deployments_url":"https://api.github.com/repos/dcos/cosmos/deployments","created_at":"2015-12-07T23:23:49Z","updated_at":"2016-05-23T15:33:17Z","pushed_at":"2016-05-23T20:34:01Z","git_url":"git://github.com/dcos/cosmos.git","ssh_url":"git@github.com:dcos/cosmos.git","clone_url":"https://github.com/dcos/cosmos.git","svn_url":"https://github.com/dcos/cosmos","homepage":"","size":509,"stargazers_count":20,"watchers_count":20,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":96,"forks":2,"open_issues":96,"watchers":20,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dcos/cosmos/pulls/341"},"html":{"href":"https://github.com/dcos/cosmos/pull/341"},"issue":{"href":"https://api.github.com/repos/dcos/cosmos/issues/341"},"comments":{"href":"https://api.github.com/repos/dcos/cosmos/issues/341/comments"},"review_comments":{"href":"https://api.github.com/repos/dcos/cosmos/pulls/341/comments"},"review_comment":{"href":"https://api.github.com/repos/dcos/cosmos/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dcos/cosmos/pulls/341/commits"},"statuses":{"href":"https://api.github.com/repos/dcos/cosmos/statuses/645f8a5cb1a2b0cbd92f90a7fc255332d5635694"}}}}
{"actor":{"display_login":"cruhland"}}