{"action":"created","issue":{"url":"https://api.github.com/repos/eclipse/smarthome/issues/2136","repository_url":"https://api.github.com/repos/eclipse/smarthome","labels_url":"https://api.github.com/repos/eclipse/smarthome/issues/2136/labels{/name}","comments_url":"https://api.github.com/repos/eclipse/smarthome/issues/2136/comments","events_url":"https://api.github.com/repos/eclipse/smarthome/issues/2136/events","html_url":"https://github.com/eclipse/smarthome/issues/2136","id":175491403,"number":2136,"title":"Avoid error logging in HttpUtil","user":{"login":"kaikreuzer","id":3244965,"avatar_url":"https://avatars.githubusercontent.com/u/3244965?v=3","gravatar_id":"","url":"https://api.github.com/users/kaikreuzer","html_url":"https://github.com/kaikreuzer","followers_url":"https://api.github.com/users/kaikreuzer/followers","following_url":"https://api.github.com/users/kaikreuzer/following{/other_user}","gists_url":"https://api.github.com/users/kaikreuzer/gists{/gist_id}","starred_url":"https://api.github.com/users/kaikreuzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaikreuzer/subscriptions","organizations_url":"https://api.github.com/users/kaikreuzer/orgs","repos_url":"https://api.github.com/users/kaikreuzer/repos","events_url":"https://api.github.com/users/kaikreuzer/events{/privacy}","received_events_url":"https://api.github.com/users/kaikreuzer/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/eclipse/smarthome/labels/Core","name":"Core","color":"207de5"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-09-07T12:35:56Z","updated_at":"2016-09-08T11:09:17Z","closed_at":null,"body":"My log is full of errors like\r\n```\r\n14:30:47.400 [ERROR] [lipse.smarthome.io.net.http.HttpUtil] - Fatal transport error: java.util.concurrent.ExecutionException: java.net.SocketTimeoutException: Connect Timeout\r\n14:30:47.400 [ERROR] [lipse.smarthome.io.net.http.HttpUtil] - Fatal transport error: java.util.concurrent.ExecutionException: java.net.SocketTimeoutException: Connect Timeout\r\n```\r\nThis is due to the fact that the AVM Fritz binding is using HttpUtil for accessing the device and the device is not reachable (which is expected, because I am in a different network) - this should result in the Thing being OFFLINE, but not in a log cluttered with errors.\r\n\r\nI would suggest to change the methods in HttpUtil to only log debug at max, but additionally to throw IOExceptions, so that the caller actually has a chance to notice that his call wasn't successfully executed.\r\n\r\nThe main reason that this wasn't done in the past is that `org.eclipse.smarthome.model.script.actions.HTTP` uses these methods and must not throw an exception (because it could not be handled within the scripts/rules). So this HTTP class should actually catch the IOExceptions and log an error instead.\r\n\r\n@svilenvul As you were working on HttpUtil in the past, would you be willing to implement this change (and check that the callers can deal with the newly introduced IOException)?\r\n"},"comment":{"url":"https://api.github.com/repos/eclipse/smarthome/issues/comments/245565579","html_url":"https://github.com/eclipse/smarthome/issues/2136#issuecomment-245565579","issue_url":"https://api.github.com/repos/eclipse/smarthome/issues/2136","id":245565579,"user":{"login":"svilenvul","id":7120104,"avatar_url":"https://avatars.githubusercontent.com/u/7120104?v=3","gravatar_id":"","url":"https://api.github.com/users/svilenvul","html_url":"https://github.com/svilenvul","followers_url":"https://api.github.com/users/svilenvul/followers","following_url":"https://api.github.com/users/svilenvul/following{/other_user}","gists_url":"https://api.github.com/users/svilenvul/gists{/gist_id}","starred_url":"https://api.github.com/users/svilenvul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svilenvul/subscriptions","organizations_url":"https://api.github.com/users/svilenvul/orgs","repos_url":"https://api.github.com/users/svilenvul/repos","events_url":"https://api.github.com/users/svilenvul/events{/privacy}","received_events_url":"https://api.github.com/users/svilenvul/received_events","type":"User","site_admin":false},"created_at":"2016-09-08T11:09:17Z","updated_at":"2016-09-08T11:09:17Z","body":"Additional PR will be opened for the openhab2-addons bundle that are affected as well:\r\n\r\n- org.openhab.binding.astro\r\n- org.openhab.binding.avmfritz\r\n- org.openhab.binding.freebox\r\n- org.openhab.binding.hdanywhere\r\n\r\nI will make a sample exception handling in the PR, but I guess the developers that implemented the bindings will take a look, if it is ok as well.  "}}
{"actor":{"display_login":"svilenvul"}}