{"action":"created","issue":{"url":"https://api.github.com/repos/yegor256/rultor/issues/1126","repository_url":"https://api.github.com/repos/yegor256/rultor","labels_url":"https://api.github.com/repos/yegor256/rultor/issues/1126/labels{/name}","comments_url":"https://api.github.com/repos/yegor256/rultor/issues/1126/comments","events_url":"https://api.github.com/repos/yegor256/rultor/issues/1126/events","html_url":"https://github.com/yegor256/rultor/pull/1126","id":176241852,"number":1126,"title":"#1125 Preventing ","user":{"login":"original-brownbear","id":6490959,"avatar_url":"https://avatars.githubusercontent.com/u/6490959?v=3","gravatar_id":"","url":"https://api.github.com/users/original-brownbear","html_url":"https://github.com/original-brownbear","followers_url":"https://api.github.com/users/original-brownbear/followers","following_url":"https://api.github.com/users/original-brownbear/following{/other_user}","gists_url":"https://api.github.com/users/original-brownbear/gists{/gist_id}","starred_url":"https://api.github.com/users/original-brownbear/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/original-brownbear/subscriptions","organizations_url":"https://api.github.com/users/original-brownbear/orgs","repos_url":"https://api.github.com/users/original-brownbear/repos","events_url":"https://api.github.com/users/original-brownbear/events{/privacy}","received_events_url":"https://api.github.com/users/original-brownbear/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/yegor256/rultor/labels/15%20mins","name":"15 mins","color":"eb6421"},{"url":"https://api.github.com/repos/yegor256/rultor/labels/CR","name":"CR","color":"bfd4f3"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-09-11T12:38:57Z","updated_at":"2016-09-11T16:20:00Z","closed_at":"2016-09-11T16:18:55Z","pull_request":{"url":"https://api.github.com/repos/yegor256/rultor/pulls/1126","html_url":"https://github.com/yegor256/rultor/pull/1126","diff_url":"https://github.com/yegor256/rultor/pull/1126.diff","patch_url":"https://github.com/yegor256/rultor/pull/1126.patch"},"body":"Quick fix for #1125 and puzzle asking for a lasting solution to this design issue.\r\n\r\nThe problem here is with `comment.body()` throwing an `AssertionException` since `RtJson` eventually runs this:\r\n\r\n```java\r\n    public JsonObject fetch() throws IOException {\r\n        return this.request.fetch()\r\n            .as(RestResponse.class)\r\n            .assertStatus(HttpURLConnection.HTTP_OK)\r\n            .as(JsonResponse.class)\r\n            .json().readObject();\r\n    }\r\n```\r\n\r\nwhich gives us `AssertionException` if the initial deletion of the comment causes a `404` when Rultor tries to retrieve it.\r\nIn general these errors should not cause Rultor to globally die, but I don't have the time to handle this in a safe manner on short notice today. Hence I added the puzzle asking for a proper change in design here, preventing this and similar issues in the first place."},"comment":{"url":"https://api.github.com/repos/yegor256/rultor/issues/comments/246188778","html_url":"https://github.com/yegor256/rultor/pull/1126#issuecomment-246188778","issue_url":"https://api.github.com/repos/yegor256/rultor/issues/1126","id":246188778,"user":{"login":"yegor256","id":526301,"avatar_url":"https://avatars.githubusercontent.com/u/526301?v=3","gravatar_id":"","url":"https://api.github.com/users/yegor256","html_url":"https://github.com/yegor256","followers_url":"https://api.github.com/users/yegor256/followers","following_url":"https://api.github.com/users/yegor256/following{/other_user}","gists_url":"https://api.github.com/users/yegor256/gists{/gist_id}","starred_url":"https://api.github.com/users/yegor256/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yegor256/subscriptions","organizations_url":"https://api.github.com/users/yegor256/orgs","repos_url":"https://api.github.com/users/yegor256/repos","events_url":"https://api.github.com/users/yegor256/events{/privacy}","received_events_url":"https://api.github.com/users/yegor256/received_events","type":"User","site_admin":false},"created_at":"2016-09-11T16:20:00Z","updated_at":"2016-09-11T16:20:00Z","body":"@original-brownbear I merged this and will deploy now, but it's a wrong solution. We have to roll it back when the problem goes away and implement it the right way. And the right way is to create a decorator for `Comment`, which will make sure that when comment is not found it returns empty string for `body()`. Make sense?"}}
{"actor":{"display_login":"yegor256"}}