{"action":"created","issue":{"url":"https://api.github.com/repos/18F/api.data.gov/issues/99","labels_url":"https://api.github.com/repos/18F/api.data.gov/issues/99/labels{/name}","comments_url":"https://api.github.com/repos/18F/api.data.gov/issues/99/comments","events_url":"https://api.github.com/repos/18F/api.data.gov/issues/99/events","html_url":"https://github.com/18F/api.data.gov/issues/99","id":38768838,"number":99,"title":"Make 404 not found responses consistent","user":{"login":"GUI","id":12112,"avatar_url":"https://avatars.githubusercontent.com/u/12112?v=3","gravatar_id":"","url":"https://api.github.com/users/GUI","html_url":"https://github.com/GUI","followers_url":"https://api.github.com/users/GUI/followers","following_url":"https://api.github.com/users/GUI/following{/other_user}","gists_url":"https://api.github.com/users/GUI/gists{/gist_id}","starred_url":"https://api.github.com/users/GUI/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GUI/subscriptions","organizations_url":"https://api.github.com/users/GUI/orgs","repos_url":"https://api.github.com/users/GUI/repos","events_url":"https://api.github.com/users/GUI/events{/privacy}","received_events_url":"https://api.github.com/users/GUI/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"GUI","id":12112,"avatar_url":"https://avatars.githubusercontent.com/u/12112?v=3","gravatar_id":"","url":"https://api.github.com/users/GUI","html_url":"https://github.com/GUI","followers_url":"https://api.github.com/users/GUI/followers","following_url":"https://api.github.com/users/GUI/following{/other_user}","gists_url":"https://api.github.com/users/GUI/gists{/gist_id}","starred_url":"https://api.github.com/users/GUI/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GUI/subscriptions","organizations_url":"https://api.github.com/users/GUI/orgs","repos_url":"https://api.github.com/users/GUI/repos","events_url":"https://api.github.com/users/GUI/events{/privacy}","received_events_url":"https://api.github.com/users/GUI/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/18F/api.data.gov/milestones/19","html_url":"https://github.com/18F/api.data.gov/milestones/Sprint%2018%20(3/23-4/3)","labels_url":"https://api.github.com/repos/18F/api.data.gov/milestones/19/labels","id":1034294,"number":19,"title":"Sprint 18 (3/23-4/3)","description":"","creator":{"login":"gbinal","id":633088,"avatar_url":"https://avatars.githubusercontent.com/u/633088?v=3","gravatar_id":"","url":"https://api.github.com/users/gbinal","html_url":"https://github.com/gbinal","followers_url":"https://api.github.com/users/gbinal/followers","following_url":"https://api.github.com/users/gbinal/following{/other_user}","gists_url":"https://api.github.com/users/gbinal/gists{/gist_id}","starred_url":"https://api.github.com/users/gbinal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gbinal/subscriptions","organizations_url":"https://api.github.com/users/gbinal/orgs","repos_url":"https://api.github.com/users/gbinal/repos","events_url":"https://api.github.com/users/gbinal/events{/privacy}","received_events_url":"https://api.github.com/users/gbinal/received_events","type":"User","site_admin":false},"open_issues":8,"closed_issues":4,"state":"open","created_at":"2015-03-23T15:32:09Z","updated_at":"2015-03-30T02:37:06Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2014-07-25T20:48:59Z","updated_at":"2015-03-30T02:37:06Z","closed_at":"2015-03-30T02:37:06Z","body":"Depending on where you hit in the site, you may get a different 404 experience:\r\n\r\n- http://api.data.gov/foo (ugly)\r\n- http://api.data.gov/docs/foo (pretty)\r\n\r\nThe reason for these differences has to do with how we route API requests vs web page requests differently (see [this comment](https://github.com/18F/api.data.gov/issues/89#issuecomment-50201252) for more details).\r\n\r\nI think ideally we want these not found experiences to be consistent, and preferably the prettier one for web site users.\r\n\r\nThis is achievable in a variety of different ways, but one way might be to configure API Umbrella's errors (currently the ugly ones) to use the pretty template when returning HTML error responses (since web browser users should get the HTML responses based on API Umbrella's content negotiation)."},"comment":{"url":"https://api.github.com/repos/18F/api.data.gov/issues/comments/87519253","html_url":"https://github.com/18F/api.data.gov/issues/99#issuecomment-87519253","issue_url":"https://api.github.com/repos/18F/api.data.gov/issues/99","id":87519253,"user":{"login":"GUI","id":12112,"avatar_url":"https://avatars.githubusercontent.com/u/12112?v=3","gravatar_id":"","url":"https://api.github.com/users/GUI","html_url":"https://github.com/GUI","followers_url":"https://api.github.com/users/GUI/followers","following_url":"https://api.github.com/users/GUI/following{/other_user}","gists_url":"https://api.github.com/users/GUI/gists{/gist_id}","starred_url":"https://api.github.com/users/GUI/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GUI/subscriptions","organizations_url":"https://api.github.com/users/GUI/orgs","repos_url":"https://api.github.com/users/GUI/repos","events_url":"https://api.github.com/users/GUI/events{/privacy}","received_events_url":"https://api.github.com/users/GUI/received_events","type":"User","site_admin":false},"created_at":"2015-03-30T02:37:06Z","updated_at":"2015-03-30T02:37:06Z","body":"This was fixed by the routing improvements made in https://github.com/18F/api.data.gov/issues/146 Now both of those example URLs will result in the more friendly not found page. More generally, any URL that's not part of a known API will get routed to the website content where we can deliver more friendly error pages."}}