{"action":"created","comment":{"url":"https://api.github.com/repos/orhanobut/wasp/pulls/comments/23488342","id":23488342,"diff_hunk":"@@ -54,4 +54,8 @@ public void log(LogLevel logLevel) {\n                 // Method is called but log level is not meant to log anything\n         }\n     }\n+\n+    public WaspError toWaspError(String errorMsg) {\n+        return new WaspError(url, statusCode, headers, errorMsg, body.getBytes(), networkTime);","path":"wasp/src/main/java/com/orhanobut/wasp/WaspResponse.java","position":6,"original_position":6,"commit_id":"1c84c2f3c808d4af236c6b6f9ab2fc41ea44068e","original_commit_id":"1c84c2f3c808d4af236c6b6f9ab2fc41ea44068e","user":{"login":"orhanobut","id":1089616,"avatar_url":"https://avatars.githubusercontent.com/u/1089616?v=3","gravatar_id":"","url":"https://api.github.com/users/orhanobut","html_url":"https://github.com/orhanobut","followers_url":"https://api.github.com/users/orhanobut/followers","following_url":"https://api.github.com/users/orhanobut/following{/other_user}","gists_url":"https://api.github.com/users/orhanobut/gists{/gist_id}","starred_url":"https://api.github.com/users/orhanobut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orhanobut/subscriptions","organizations_url":"https://api.github.com/users/orhanobut/orgs","repos_url":"https://api.github.com/users/orhanobut/repos","events_url":"https://api.github.com/users/orhanobut/events{/privacy}","received_events_url":"https://api.github.com/users/orhanobut/received_events","type":"User","site_admin":false},"body":"<code>body</code> might be null, I would suggest a null control here. \r\n<code>\r\nbyte[] bodyBytes = body != null ? body.getBytes() : null;\r\n</code>\r\n","created_at":"2015-01-23T23:28:42Z","updated_at":"2015-01-23T23:28:42Z","html_url":"https://github.com/orhanobut/wasp/pull/41#discussion_r23488342","pull_request_url":"https://api.github.com/repos/orhanobut/wasp/pulls/41","_links":{"self":{"href":"https://api.github.com/repos/orhanobut/wasp/pulls/comments/23488342"},"html":{"href":"https://github.com/orhanobut/wasp/pull/41#discussion_r23488342"},"pull_request":{"href":"https://api.github.com/repos/orhanobut/wasp/pulls/41"}}},"pull_request":{"url":"https://api.github.com/repos/orhanobut/wasp/pulls/41","id":27922918,"html_url":"https://github.com/orhanobut/wasp/pull/41","diff_url":"https://github.com/orhanobut/wasp/pull/41.diff","patch_url":"https://github.com/orhanobut/wasp/pull/41.patch","issue_url":"https://api.github.com/repos/orhanobut/wasp/issues/41","number":41,"state":"open","locked":false,"title":"Parser can now throw an exception so invalid son doesn't not crash application","user":{"login":"adrienleroy","id":4921502,"avatar_url":"https://avatars.githubusercontent.com/u/4921502?v=3","gravatar_id":"","url":"https://api.github.com/users/adrienleroy","html_url":"https://github.com/adrienleroy","followers_url":"https://api.github.com/users/adrienleroy/followers","following_url":"https://api.github.com/users/adrienleroy/following{/other_user}","gists_url":"https://api.github.com/users/adrienleroy/gists{/gist_id}","starred_url":"https://api.github.com/users/adrienleroy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adrienleroy/subscriptions","organizations_url":"https://api.github.com/users/adrienleroy/orgs","repos_url":"https://api.github.com/users/adrienleroy/repos","events_url":"https://api.github.com/users/adrienleroy/events{/privacy}","received_events_url":"https://api.github.com/users/adrienleroy/received_events","type":"User","site_admin":false},"body":"If my api gave me a 200 response code but the json is invalid it is was crashing the app","created_at":"2015-01-23T13:20:35Z","updated_at":"2015-01-23T23:28:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"da73e13aadc8661c3b6a4e95860741cd52d83cfd","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/orhanobut/wasp/pulls/41/commits","review_comments_url":"https://api.github.com/repos/orhanobut/wasp/pulls/41/comments","review_comment_url":"https://api.github.com/repos/orhanobut/wasp/pulls/comments/{number}","comments_url":"https://api.github.com/repos/orhanobut/wasp/issues/41/comments","statuses_url":"https://api.github.com/repos/orhanobut/wasp/statuses/1c84c2f3c808d4af236c6b6f9ab2fc41ea44068e","head":{"label":"adrienleroy:development","ref":"development","sha":"1c84c2f3c808d4af236c6b6f9ab2fc41ea44068e","user":{"login":"adrienleroy","id":4921502,"avatar_url":"https://avatars.githubusercontent.com/u/4921502?v=3","gravatar_id":"","url":"https://api.github.com/users/adrienleroy","html_url":"https://github.com/adrienleroy","followers_url":"https://api.github.com/users/adrienleroy/followers","following_url":"https://api.github.com/users/adrienleroy/following{/other_user}","gists_url":"https://api.github.com/users/adrienleroy/gists{/gist_id}","starred_url":"https://api.github.com/users/adrienleroy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adrienleroy/subscriptions","organizations_url":"https://api.github.com/users/adrienleroy/orgs","repos_url":"https://api.github.com/users/adrienleroy/repos","events_url":"https://api.github.com/users/adrienleroy/events{/privacy}","received_events_url":"https://api.github.com/users/adrienleroy/received_events","type":"User","site_admin":false},"repo":{"id":29728685,"name":"wasp","full_name":"adrienleroy/wasp","owner":{"login":"adrienleroy","id":4921502,"avatar_url":"https://avatars.githubusercontent.com/u/4921502?v=3","gravatar_id":"","url":"https://api.github.com/users/adrienleroy","html_url":"https://github.com/adrienleroy","followers_url":"https://api.github.com/users/adrienleroy/followers","following_url":"https://api.github.com/users/adrienleroy/following{/other_user}","gists_url":"https://api.github.com/users/adrienleroy/gists{/gist_id}","starred_url":"https://api.github.com/users/adrienleroy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adrienleroy/subscriptions","organizations_url":"https://api.github.com/users/adrienleroy/orgs","repos_url":"https://api.github.com/users/adrienleroy/repos","events_url":"https://api.github.com/users/adrienleroy/events{/privacy}","received_events_url":"https://api.github.com/users/adrienleroy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/adrienleroy/wasp","description":"Android Network Solution","fork":true,"url":"https://api.github.com/repos/adrienleroy/wasp","forks_url":"https://api.github.com/repos/adrienleroy/wasp/forks","keys_url":"https://api.github.com/repos/adrienleroy/wasp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/adrienleroy/wasp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/adrienleroy/wasp/teams","hooks_url":"https://api.github.com/repos/adrienleroy/wasp/hooks","issue_events_url":"https://api.github.com/repos/adrienleroy/wasp/issues/events{/number}","events_url":"https://api.github.com/repos/adrienleroy/wasp/events","assignees_url":"https://api.github.com/repos/adrienleroy/wasp/assignees{/user}","branches_url":"https://api.github.com/repos/adrienleroy/wasp/branches{/branch}","tags_url":"https://api.github.com/repos/adrienleroy/wasp/tags","blobs_url":"https://api.github.com/repos/adrienleroy/wasp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/adrienleroy/wasp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/adrienleroy/wasp/git/refs{/sha}","trees_url":"https://api.github.com/repos/adrienleroy/wasp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/adrienleroy/wasp/statuses/{sha}","languages_url":"https://api.github.com/repos/adrienleroy/wasp/languages","stargazers_url":"https://api.github.com/repos/adrienleroy/wasp/stargazers","contributors_url":"https://api.github.com/repos/adrienleroy/wasp/contributors","subscribers_url":"https://api.github.com/repos/adrienleroy/wasp/subscribers","subscription_url":"https://api.github.com/repos/adrienleroy/wasp/subscription","commits_url":"https://api.github.com/repos/adrienleroy/wasp/commits{/sha}","git_commits_url":"https://api.github.com/repos/adrienleroy/wasp/git/commits{/sha}","comments_url":"https://api.github.com/repos/adrienleroy/wasp/comments{/number}","issue_comment_url":"https://api.github.com/repos/adrienleroy/wasp/issues/comments/{number}","contents_url":"https://api.github.com/repos/adrienleroy/wasp/contents/{+path}","compare_url":"https://api.github.com/repos/adrienleroy/wasp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/adrienleroy/wasp/merges","archive_url":"https://api.github.com/repos/adrienleroy/wasp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/adrienleroy/wasp/downloads","issues_url":"https://api.github.com/repos/adrienleroy/wasp/issues{/number}","pulls_url":"https://api.github.com/repos/adrienleroy/wasp/pulls{/number}","milestones_url":"https://api.github.com/repos/adrienleroy/wasp/milestones{/number}","notifications_url":"https://api.github.com/repos/adrienleroy/wasp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/adrienleroy/wasp/labels{/name}","releases_url":"https://api.github.com/repos/adrienleroy/wasp/releases{/id}","created_at":"2015-01-23T10:49:28Z","updated_at":"2015-01-23T10:49:28Z","pushed_at":"2015-01-23T13:17:50Z","git_url":"git://github.com/adrienleroy/wasp.git","ssh_url":"git@github.com:adrienleroy/wasp.git","clone_url":"https://github.com/adrienleroy/wasp.git","svn_url":"https://github.com/adrienleroy/wasp","homepage":"http://orhanobut.github.io/wasp/","size":3604,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"orhanobut:development","ref":"development","sha":"6e1e6aa719cd4a32734ed72436b55249b869a1ab","user":{"login":"orhanobut","id":1089616,"avatar_url":"https://avatars.githubusercontent.com/u/1089616?v=3","gravatar_id":"","url":"https://api.github.com/users/orhanobut","html_url":"https://github.com/orhanobut","followers_url":"https://api.github.com/users/orhanobut/followers","following_url":"https://api.github.com/users/orhanobut/following{/other_user}","gists_url":"https://api.github.com/users/orhanobut/gists{/gist_id}","starred_url":"https://api.github.com/users/orhanobut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orhanobut/subscriptions","organizations_url":"https://api.github.com/users/orhanobut/orgs","repos_url":"https://api.github.com/users/orhanobut/repos","events_url":"https://api.github.com/users/orhanobut/events{/privacy}","received_events_url":"https://api.github.com/users/orhanobut/received_events","type":"User","site_admin":false},"repo":{"id":28312494,"name":"wasp","full_name":"orhanobut/wasp","owner":{"login":"orhanobut","id":1089616,"avatar_url":"https://avatars.githubusercontent.com/u/1089616?v=3","gravatar_id":"","url":"https://api.github.com/users/orhanobut","html_url":"https://github.com/orhanobut","followers_url":"https://api.github.com/users/orhanobut/followers","following_url":"https://api.github.com/users/orhanobut/following{/other_user}","gists_url":"https://api.github.com/users/orhanobut/gists{/gist_id}","starred_url":"https://api.github.com/users/orhanobut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orhanobut/subscriptions","organizations_url":"https://api.github.com/users/orhanobut/orgs","repos_url":"https://api.github.com/users/orhanobut/repos","events_url":"https://api.github.com/users/orhanobut/events{/privacy}","received_events_url":"https://api.github.com/users/orhanobut/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/orhanobut/wasp","description":"Android Network Solution","fork":false,"url":"https://api.github.com/repos/orhanobut/wasp","forks_url":"https://api.github.com/repos/orhanobut/wasp/forks","keys_url":"https://api.github.com/repos/orhanobut/wasp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/orhanobut/wasp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/orhanobut/wasp/teams","hooks_url":"https://api.github.com/repos/orhanobut/wasp/hooks","issue_events_url":"https://api.github.com/repos/orhanobut/wasp/issues/events{/number}","events_url":"https://api.github.com/repos/orhanobut/wasp/events","assignees_url":"https://api.github.com/repos/orhanobut/wasp/assignees{/user}","branches_url":"https://api.github.com/repos/orhanobut/wasp/branches{/branch}","tags_url":"https://api.github.com/repos/orhanobut/wasp/tags","blobs_url":"https://api.github.com/repos/orhanobut/wasp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/orhanobut/wasp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/orhanobut/wasp/git/refs{/sha}","trees_url":"https://api.github.com/repos/orhanobut/wasp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/orhanobut/wasp/statuses/{sha}","languages_url":"https://api.github.com/repos/orhanobut/wasp/languages","stargazers_url":"https://api.github.com/repos/orhanobut/wasp/stargazers","contributors_url":"https://api.github.com/repos/orhanobut/wasp/contributors","subscribers_url":"https://api.github.com/repos/orhanobut/wasp/subscribers","subscription_url":"https://api.github.com/repos/orhanobut/wasp/subscription","commits_url":"https://api.github.com/repos/orhanobut/wasp/commits{/sha}","git_commits_url":"https://api.github.com/repos/orhanobut/wasp/git/commits{/sha}","comments_url":"https://api.github.com/repos/orhanobut/wasp/comments{/number}","issue_comment_url":"https://api.github.com/repos/orhanobut/wasp/issues/comments/{number}","contents_url":"https://api.github.com/repos/orhanobut/wasp/contents/{+path}","compare_url":"https://api.github.com/repos/orhanobut/wasp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/orhanobut/wasp/merges","archive_url":"https://api.github.com/repos/orhanobut/wasp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/orhanobut/wasp/downloads","issues_url":"https://api.github.com/repos/orhanobut/wasp/issues{/number}","pulls_url":"https://api.github.com/repos/orhanobut/wasp/pulls{/number}","milestones_url":"https://api.github.com/repos/orhanobut/wasp/milestones{/number}","notifications_url":"https://api.github.com/repos/orhanobut/wasp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/orhanobut/wasp/labels{/name}","releases_url":"https://api.github.com/repos/orhanobut/wasp/releases{/id}","created_at":"2014-12-21T20:42:13Z","updated_at":"2015-01-23T20:39:31Z","pushed_at":"2015-01-22T20:24:20Z","git_url":"git://github.com/orhanobut/wasp.git","ssh_url":"git@github.com:orhanobut/wasp.git","clone_url":"https://github.com/orhanobut/wasp.git","svn_url":"https://github.com/orhanobut/wasp","homepage":"http://orhanobut.github.io/wasp/","size":3604,"stargazers_count":73,"watchers_count":73,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":6,"mirror_url":null,"open_issues_count":13,"forks":6,"open_issues":13,"watchers":73,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/orhanobut/wasp/pulls/41"},"html":{"href":"https://github.com/orhanobut/wasp/pull/41"},"issue":{"href":"https://api.github.com/repos/orhanobut/wasp/issues/41"},"comments":{"href":"https://api.github.com/repos/orhanobut/wasp/issues/41/comments"},"review_comments":{"href":"https://api.github.com/repos/orhanobut/wasp/pulls/41/comments"},"review_comment":{"href":"https://api.github.com/repos/orhanobut/wasp/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/orhanobut/wasp/pulls/41/commits"},"statuses":{"href":"https://api.github.com/repos/orhanobut/wasp/statuses/1c84c2f3c808d4af236c6b6f9ab2fc41ea44068e"}}}}