{"action":"created","comment":{"url":"https://api.github.com/repos/toggl/mobileapp/pulls/comments/183618585","pull_request_review_id":114645166,"id":183618585,"diff_hunk":"@@ -20,12 +20,16 @@ internal ApiException(IRequest request, IResponse response, string defaultMessag\n             Request = request;\n             Response = response;\n \n-            if (response.ContentType.Equals(\"application/json\")) {\n-                var serializer = new JsonSerializer();\n-                var error = serializer.Deserialize<ResponseError>(response.RawData);\n-                this.message = error.Message;\n+            if (response.IsJson) {\n+                try {\n+                    var serializer = new JsonSerializer();\n+                    var error = serializer.Deserialize<ResponseError>(response.RawData);\n+                    this.message = error.Message;\n+                } catch {","path":"Toggl.Ultrawave/Exceptions/ApiException.cs","position":26,"original_position":13,"commit_id":"2a41ec688ebd0102b7b880fbc339e6cec4782dc8","original_commit_id":"2a41ec688ebd0102b7b880fbc339e6cec4782dc8","user":{"login":"amulware","id":3987892,"avatar_url":"https://avatars2.githubusercontent.com/u/3987892?v=4","gravatar_id":"","url":"https://api.github.com/users/amulware","html_url":"https://github.com/amulware","followers_url":"https://api.github.com/users/amulware/followers","following_url":"https://api.github.com/users/amulware/following{/other_user}","gists_url":"https://api.github.com/users/amulware/gists{/gist_id}","starred_url":"https://api.github.com/users/amulware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amulware/subscriptions","organizations_url":"https://api.github.com/users/amulware/orgs","repos_url":"https://api.github.com/users/amulware/repos","events_url":"https://api.github.com/users/amulware/events{/privacy}","received_events_url":"https://api.github.com/users/amulware/received_events","type":"User","site_admin":false},"body":"That exception is generic? Huh.","created_at":"2018-04-24T06:39:56Z","updated_at":"2018-04-24T06:50:57Z","html_url":"https://github.com/toggl/mobileapp/pull/1949#discussion_r183618585","pull_request_url":"https://api.github.com/repos/toggl/mobileapp/pulls/1949","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/toggl/mobileapp/pulls/comments/183618585"},"html":{"href":"https://github.com/toggl/mobileapp/pull/1949#discussion_r183618585"},"pull_request":{"href":"https://api.github.com/repos/toggl/mobileapp/pulls/1949"}},"in_reply_to_id":183613286},"pull_request":{"url":"https://api.github.com/repos/toggl/mobileapp/pulls/1949","id":183489424,"html_url":"https://github.com/toggl/mobileapp/pull/1949","diff_url":"https://github.com/toggl/mobileapp/pull/1949.diff","patch_url":"https://github.com/toggl/mobileapp/pull/1949.patch","issue_url":"https://api.github.com/repos/toggl/mobileapp/issues/1949","number":1949,"state":"open","locked":false,"title":"Deserialize errors from JSON and use message key","user":{"login":"juanlaube","id":8163330,"avatar_url":"https://avatars2.githubusercontent.com/u/8163330?v=4","gravatar_id":"","url":"https://api.github.com/users/juanlaube","html_url":"https://github.com/juanlaube","followers_url":"https://api.github.com/users/juanlaube/followers","following_url":"https://api.github.com/users/juanlaube/following{/other_user}","gists_url":"https://api.github.com/users/juanlaube/gists{/gist_id}","starred_url":"https://api.github.com/users/juanlaube/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juanlaube/subscriptions","organizations_url":"https://api.github.com/users/juanlaube/orgs","repos_url":"https://api.github.com/users/juanlaube/repos","events_url":"https://api.github.com/users/juanlaube/events{/privacy}","received_events_url":"https://api.github.com/users/juanlaube/received_events","type":"User","site_admin":false},"body":"Closes #1922","created_at":"2018-04-23T16:26:08Z","updated_at":"2018-04-24T06:50:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"29b9e9bde8470bcd02b5eac3be1d43bd96619f1b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/toggl/mobileapp/pulls/1949/commits","review_comments_url":"https://api.github.com/repos/toggl/mobileapp/pulls/1949/comments","review_comment_url":"https://api.github.com/repos/toggl/mobileapp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/toggl/mobileapp/issues/1949/comments","statuses_url":"https://api.github.com/repos/toggl/mobileapp/statuses/2a41ec688ebd0102b7b880fbc339e6cec4782dc8","head":{"label":"toggl:better-api-errors","ref":"better-api-errors","sha":"2a41ec688ebd0102b7b880fbc339e6cec4782dc8","user":{"login":"toggl","id":316475,"avatar_url":"https://avatars3.githubusercontent.com/u/316475?v=4","gravatar_id":"","url":"https://api.github.com/users/toggl","html_url":"https://github.com/toggl","followers_url":"https://api.github.com/users/toggl/followers","following_url":"https://api.github.com/users/toggl/following{/other_user}","gists_url":"https://api.github.com/users/toggl/gists{/gist_id}","starred_url":"https://api.github.com/users/toggl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toggl/subscriptions","organizations_url":"https://api.github.com/users/toggl/orgs","repos_url":"https://api.github.com/users/toggl/repos","events_url":"https://api.github.com/users/toggl/events{/privacy}","received_events_url":"https://api.github.com/users/toggl/received_events","type":"Organization","site_admin":false},"repo":{"id":87079363,"name":"mobileapp","full_name":"toggl/mobileapp","owner":{"login":"toggl","id":316475,"avatar_url":"https://avatars3.githubusercontent.com/u/316475?v=4","gravatar_id":"","url":"https://api.github.com/users/toggl","html_url":"https://github.com/toggl","followers_url":"https://api.github.com/users/toggl/followers","following_url":"https://api.github.com/users/toggl/following{/other_user}","gists_url":"https://api.github.com/users/toggl/gists{/gist_id}","starred_url":"https://api.github.com/users/toggl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toggl/subscriptions","organizations_url":"https://api.github.com/users/toggl/orgs","repos_url":"https://api.github.com/users/toggl/repos","events_url":"https://api.github.com/users/toggl/events{/privacy}","received_events_url":"https://api.github.com/users/toggl/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/toggl/mobileapp","description":"Toggl's mobile apps","fork":false,"url":"https://api.github.com/repos/toggl/mobileapp","forks_url":"https://api.github.com/repos/toggl/mobileapp/forks","keys_url":"https://api.github.com/repos/toggl/mobileapp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/toggl/mobileapp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/toggl/mobileapp/teams","hooks_url":"https://api.github.com/repos/toggl/mobileapp/hooks","issue_events_url":"https://api.github.com/repos/toggl/mobileapp/issues/events{/number}","events_url":"https://api.github.com/repos/toggl/mobileapp/events","assignees_url":"https://api.github.com/repos/toggl/mobileapp/assignees{/user}","branches_url":"https://api.github.com/repos/toggl/mobileapp/branches{/branch}","tags_url":"https://api.github.com/repos/toggl/mobileapp/tags","blobs_url":"https://api.github.com/repos/toggl/mobileapp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/toggl/mobileapp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/toggl/mobileapp/git/refs{/sha}","trees_url":"https://api.github.com/repos/toggl/mobileapp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/toggl/mobileapp/statuses/{sha}","languages_url":"https://api.github.com/repos/toggl/mobileapp/languages","stargazers_url":"https://api.github.com/repos/toggl/mobileapp/stargazers","contributors_url":"https://api.github.com/repos/toggl/mobileapp/contributors","subscribers_url":"https://api.github.com/repos/toggl/mobileapp/subscribers","subscription_url":"https://api.github.com/repos/toggl/mobileapp/subscription","commits_url":"https://api.github.com/repos/toggl/mobileapp/commits{/sha}","git_commits_url":"https://api.github.com/repos/toggl/mobileapp/git/commits{/sha}","comments_url":"https://api.github.com/repos/toggl/mobileapp/comments{/number}","issue_comment_url":"https://api.github.com/repos/toggl/mobileapp/issues/comments{/number}","contents_url":"https://api.github.com/repos/toggl/mobileapp/contents/{+path}","compare_url":"https://api.github.com/repos/toggl/mobileapp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/toggl/mobileapp/merges","archive_url":"https://api.github.com/repos/toggl/mobileapp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/toggl/mobileapp/downloads","issues_url":"https://api.github.com/repos/toggl/mobileapp/issues{/number}","pulls_url":"https://api.github.com/repos/toggl/mobileapp/pulls{/number}","milestones_url":"https://api.github.com/repos/toggl/mobileapp/milestones{/number}","notifications_url":"https://api.github.com/repos/toggl/mobileapp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/toggl/mobileapp/labels{/name}","releases_url":"https://api.github.com/repos/toggl/mobileapp/releases{/id}","deployments_url":"https://api.github.com/repos/toggl/mobileapp/deployments","created_at":"2017-04-03T13:48:06Z","updated_at":"2018-04-23T18:00:02Z","pushed_at":"2018-04-23T18:00:06Z","git_url":"git://github.com/toggl/mobileapp.git","ssh_url":"git@github.com:toggl/mobileapp.git","clone_url":"https://github.com/toggl/mobileapp.git","svn_url":"https://github.com/toggl/mobileapp","homepage":"","size":15056,"stargazers_count":61,"watchers_count":61,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":21,"mirror_url":null,"archived":false,"open_issues_count":160,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":21,"open_issues":160,"watchers":61,"default_branch":"develop"}},"base":{"label":"toggl:develop","ref":"develop","sha":"cfacc5734c1c99f0908dba9cabdb0218d5950e14","user":{"login":"toggl","id":316475,"avatar_url":"https://avatars3.githubusercontent.com/u/316475?v=4","gravatar_id":"","url":"https://api.github.com/users/toggl","html_url":"https://github.com/toggl","followers_url":"https://api.github.com/users/toggl/followers","following_url":"https://api.github.com/users/toggl/following{/other_user}","gists_url":"https://api.github.com/users/toggl/gists{/gist_id}","starred_url":"https://api.github.com/users/toggl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toggl/subscriptions","organizations_url":"https://api.github.com/users/toggl/orgs","repos_url":"https://api.github.com/users/toggl/repos","events_url":"https://api.github.com/users/toggl/events{/privacy}","received_events_url":"https://api.github.com/users/toggl/received_events","type":"Organization","site_admin":false},"repo":{"id":87079363,"name":"mobileapp","full_name":"toggl/mobileapp","owner":{"login":"toggl","id":316475,"avatar_url":"https://avatars3.githubusercontent.com/u/316475?v=4","gravatar_id":"","url":"https://api.github.com/users/toggl","html_url":"https://github.com/toggl","followers_url":"https://api.github.com/users/toggl/followers","following_url":"https://api.github.com/users/toggl/following{/other_user}","gists_url":"https://api.github.com/users/toggl/gists{/gist_id}","starred_url":"https://api.github.com/users/toggl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toggl/subscriptions","organizations_url":"https://api.github.com/users/toggl/orgs","repos_url":"https://api.github.com/users/toggl/repos","events_url":"https://api.github.com/users/toggl/events{/privacy}","received_events_url":"https://api.github.com/users/toggl/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/toggl/mobileapp","description":"Toggl's mobile apps","fork":false,"url":"https://api.github.com/repos/toggl/mobileapp","forks_url":"https://api.github.com/repos/toggl/mobileapp/forks","keys_url":"https://api.github.com/repos/toggl/mobileapp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/toggl/mobileapp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/toggl/mobileapp/teams","hooks_url":"https://api.github.com/repos/toggl/mobileapp/hooks","issue_events_url":"https://api.github.com/repos/toggl/mobileapp/issues/events{/number}","events_url":"https://api.github.com/repos/toggl/mobileapp/events","assignees_url":"https://api.github.com/repos/toggl/mobileapp/assignees{/user}","branches_url":"https://api.github.com/repos/toggl/mobileapp/branches{/branch}","tags_url":"https://api.github.com/repos/toggl/mobileapp/tags","blobs_url":"https://api.github.com/repos/toggl/mobileapp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/toggl/mobileapp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/toggl/mobileapp/git/refs{/sha}","trees_url":"https://api.github.com/repos/toggl/mobileapp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/toggl/mobileapp/statuses/{sha}","languages_url":"https://api.github.com/repos/toggl/mobileapp/languages","stargazers_url":"https://api.github.com/repos/toggl/mobileapp/stargazers","contributors_url":"https://api.github.com/repos/toggl/mobileapp/contributors","subscribers_url":"https://api.github.com/repos/toggl/mobileapp/subscribers","subscription_url":"https://api.github.com/repos/toggl/mobileapp/subscription","commits_url":"https://api.github.com/repos/toggl/mobileapp/commits{/sha}","git_commits_url":"https://api.github.com/repos/toggl/mobileapp/git/commits{/sha}","comments_url":"https://api.github.com/repos/toggl/mobileapp/comments{/number}","issue_comment_url":"https://api.github.com/repos/toggl/mobileapp/issues/comments{/number}","contents_url":"https://api.github.com/repos/toggl/mobileapp/contents/{+path}","compare_url":"https://api.github.com/repos/toggl/mobileapp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/toggl/mobileapp/merges","archive_url":"https://api.github.com/repos/toggl/mobileapp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/toggl/mobileapp/downloads","issues_url":"https://api.github.com/repos/toggl/mobileapp/issues{/number}","pulls_url":"https://api.github.com/repos/toggl/mobileapp/pulls{/number}","milestones_url":"https://api.github.com/repos/toggl/mobileapp/milestones{/number}","notifications_url":"https://api.github.com/repos/toggl/mobileapp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/toggl/mobileapp/labels{/name}","releases_url":"https://api.github.com/repos/toggl/mobileapp/releases{/id}","deployments_url":"https://api.github.com/repos/toggl/mobileapp/deployments","created_at":"2017-04-03T13:48:06Z","updated_at":"2018-04-23T18:00:02Z","pushed_at":"2018-04-23T18:00:06Z","git_url":"git://github.com/toggl/mobileapp.git","ssh_url":"git@github.com:toggl/mobileapp.git","clone_url":"https://github.com/toggl/mobileapp.git","svn_url":"https://github.com/toggl/mobileapp","homepage":"","size":15056,"stargazers_count":61,"watchers_count":61,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":21,"mirror_url":null,"archived":false,"open_issues_count":160,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":21,"open_issues":160,"watchers":61,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/toggl/mobileapp/pulls/1949"},"html":{"href":"https://github.com/toggl/mobileapp/pull/1949"},"issue":{"href":"https://api.github.com/repos/toggl/mobileapp/issues/1949"},"comments":{"href":"https://api.github.com/repos/toggl/mobileapp/issues/1949/comments"},"review_comments":{"href":"https://api.github.com/repos/toggl/mobileapp/pulls/1949/comments"},"review_comment":{"href":"https://api.github.com/repos/toggl/mobileapp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/toggl/mobileapp/pulls/1949/commits"},"statuses":{"href":"https://api.github.com/repos/toggl/mobileapp/statuses/2a41ec688ebd0102b7b880fbc339e6cec4782dc8"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"amulware"}}