{"action":"created","issue":{"url":"https://api.github.com/repos/tsuru/tsuru/issues/1242","labels_url":"https://api.github.com/repos/tsuru/tsuru/issues/1242/labels{/name}","comments_url":"https://api.github.com/repos/tsuru/tsuru/issues/1242/comments","events_url":"https://api.github.com/repos/tsuru/tsuru/issues/1242/events","html_url":"https://github.com/tsuru/tsuru/issues/1242","id":95457247,"number":1242,"title":"Inconsistencies in the tsuru API when an object is not found","user":{"login":"dhilton","id":47292,"avatar_url":"https://avatars.githubusercontent.com/u/47292?v=3","gravatar_id":"","url":"https://api.github.com/users/dhilton","html_url":"https://github.com/dhilton","followers_url":"https://api.github.com/users/dhilton/followers","following_url":"https://api.github.com/users/dhilton/following{/other_user}","gists_url":"https://api.github.com/users/dhilton/gists{/gist_id}","starred_url":"https://api.github.com/users/dhilton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhilton/subscriptions","organizations_url":"https://api.github.com/users/dhilton/orgs","repos_url":"https://api.github.com/users/dhilton/repos","events_url":"https://api.github.com/users/dhilton/events{/privacy}","received_events_url":"https://api.github.com/users/dhilton/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-07-16T15:17:37Z","updated_at":"2015-10-28T13:50:26Z","closed_at":"2015-10-28T13:50:26Z","body":"The tsuru API is a little bit inconsistent when returning the state of an object, if it doesn't exist.\r\n\r\nFor example, when you try to remove an application that doesn't exist, the API returns a 404.\r\n\r\nWhen you try to remove a user that doesn't exist, the API returns a 500.\r\n\r\nMy personal preference is that when you try to delete something that doesn't exist it should return a 404, but at least be consistent if possible. Happy to help with a PR if that makes sense."},"comment":{"url":"https://api.github.com/repos/tsuru/tsuru/issues/comments/151849914","html_url":"https://github.com/tsuru/tsuru/issues/1242#issuecomment-151849914","issue_url":"https://api.github.com/repos/tsuru/tsuru/issues/1242","id":151849914,"user":{"login":"fsouza","id":108725,"avatar_url":"https://avatars.githubusercontent.com/u/108725?v=3","gravatar_id":"","url":"https://api.github.com/users/fsouza","html_url":"https://github.com/fsouza","followers_url":"https://api.github.com/users/fsouza/followers","following_url":"https://api.github.com/users/fsouza/following{/other_user}","gists_url":"https://api.github.com/users/fsouza/gists{/gist_id}","starred_url":"https://api.github.com/users/fsouza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fsouza/subscriptions","organizations_url":"https://api.github.com/users/fsouza/orgs","repos_url":"https://api.github.com/users/fsouza/repos","events_url":"https://api.github.com/users/fsouza/events{/privacy}","received_events_url":"https://api.github.com/users/fsouza/received_events","type":"User","site_admin":false},"created_at":"2015-10-28T13:50:26Z","updated_at":"2015-10-28T13:50:26Z","body":"I think we're done with all not founds. I'm closing this issue, @dhilton please feel free to reopen it if you find status code inconsistencies in the API.\r\n\r\nThanks!"}}