{"action":"created","issue":{"url":"https://api.github.com/repos/mezuro/kalibro_client/issues/88","repository_url":"https://api.github.com/repos/mezuro/kalibro_client","labels_url":"https://api.github.com/repos/mezuro/kalibro_client/issues/88/labels{/name}","comments_url":"https://api.github.com/repos/mezuro/kalibro_client/issues/88/comments","events_url":"https://api.github.com/repos/mezuro/kalibro_client/issues/88/events","html_url":"https://github.com/mezuro/kalibro_client/issues/88","id":115959007,"number":88,"title":"Handle invalid repository URL on branch retrieval","user":{"login":"rafamanzo","id":288884,"avatar_url":"https://avatars.githubusercontent.com/u/288884?v=3","gravatar_id":"","url":"https://api.github.com/users/rafamanzo","html_url":"https://github.com/rafamanzo","followers_url":"https://api.github.com/users/rafamanzo/followers","following_url":"https://api.github.com/users/rafamanzo/following{/other_user}","gists_url":"https://api.github.com/users/rafamanzo/gists{/gist_id}","starred_url":"https://api.github.com/users/rafamanzo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rafamanzo/subscriptions","organizations_url":"https://api.github.com/users/rafamanzo/orgs","repos_url":"https://api.github.com/users/rafamanzo/repos","events_url":"https://api.github.com/users/rafamanzo/events{/privacy}","received_events_url":"https://api.github.com/users/rafamanzo/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mezuro/kalibro_client/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-09T20:29:37Z","updated_at":"2016-03-18T19:31:20Z","closed_at":null,"body":"Invalid URL errors on branch retrieval are returned by processor with status 5XX (unprocessable_entity).\r\n\r\nKalibroClient handles such status raising RequestErrors which finally are not expected by clients like Prezento."},"comment":{"url":"https://api.github.com/repos/mezuro/kalibro_client/issues/comments/198511039","html_url":"https://github.com/mezuro/kalibro_client/issues/88#issuecomment-198511039","issue_url":"https://api.github.com/repos/mezuro/kalibro_client/issues/88","id":198511039,"user":{"login":"rafamanzo","id":288884,"avatar_url":"https://avatars.githubusercontent.com/u/288884?v=3","gravatar_id":"","url":"https://api.github.com/users/rafamanzo","html_url":"https://github.com/rafamanzo","followers_url":"https://api.github.com/users/rafamanzo/followers","following_url":"https://api.github.com/users/rafamanzo/following{/other_user}","gists_url":"https://api.github.com/users/rafamanzo/gists{/gist_id}","starred_url":"https://api.github.com/users/rafamanzo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rafamanzo/subscriptions","organizations_url":"https://api.github.com/users/rafamanzo/orgs","repos_url":"https://api.github.com/users/rafamanzo/repos","events_url":"https://api.github.com/users/rafamanzo/events{/privacy}","received_events_url":"https://api.github.com/users/rafamanzo/received_events","type":"User","site_admin":false},"created_at":"2016-03-18T19:31:20Z","updated_at":"2016-03-18T19:31:20Z","body":"This can be fixed by adding the following behaviour to the [`Repository#branches` method](https://github.com/mezuro/kalibro_client/blob/master/lib/kalibro_client/entities/processor/repository.rb#L119):\r\n\r\n1. Rescue `RequestError`\r\n2. Check if it matches one of the [KalibroProcessor's messages](https://github.com/mezuro/kalibro_processor/blob/master/app/controllers/repositories_controller.rb#L12)\r\n3. Raise a new error (you should create a new error class)"}}