{"action":"created","issue":{"url":"https://api.github.com/repos/sinatra/sinatra/issues/1204","repository_url":"https://api.github.com/repos/sinatra/sinatra","labels_url":"https://api.github.com/repos/sinatra/sinatra/issues/1204/labels{/name}","comments_url":"https://api.github.com/repos/sinatra/sinatra/issues/1204/comments","events_url":"https://api.github.com/repos/sinatra/sinatra/issues/1204/events","html_url":"https://github.com/sinatra/sinatra/issues/1204","id":189223769,"number":1204,"title":"Exceptions with http status code 400 ignore exception settings","user":{"login":"tamoyal","id":46859,"avatar_url":"https://avatars.githubusercontent.com/u/46859?v=3","gravatar_id":"","url":"https://api.github.com/users/tamoyal","html_url":"https://github.com/tamoyal","followers_url":"https://api.github.com/users/tamoyal/followers","following_url":"https://api.github.com/users/tamoyal/following{/other_user}","gists_url":"https://api.github.com/users/tamoyal/gists{/gist_id}","starred_url":"https://api.github.com/users/tamoyal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tamoyal/subscriptions","organizations_url":"https://api.github.com/users/tamoyal/orgs","repos_url":"https://api.github.com/users/tamoyal/repos","events_url":"https://api.github.com/users/tamoyal/events{/privacy}","received_events_url":"https://api.github.com/users/tamoyal/received_events","type":"User","site_admin":false},"labels":[{"id":174479837,"url":"https://api.github.com/repos/sinatra/sinatra/labels/feedback","name":"feedback","color":"c7def8","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":14,"created_at":"2016-11-14T20:56:13Z","updated_at":"2016-12-15T00:45:20Z","closed_at":null,"body":"Regardless of my exception settings in Sinatra (the flags `raise_errors`, `dump_errors`, `show_exceptions`), exceptions get eaten and not logged if there is a non 500-599 http status error code associated with them. For example, I am using the [koala](https://github.com/arsduo/koala) library to communicate with Facebook and the library can raise exceptions with an http status code of 400 if an OAuth token is invalid. I feel like if this happens and my Sinatra application is not rescuing that error, it should appear in the logs in development mode. It doesn't because of the following line in the `handle_exception!` method:\r\n`return res if res or not server_error?`\r\n\r\nThis seems very intentional given Sinatra is relatively mature. Am I off here or does this seem bad to anyone else?"},"comment":{"url":"https://api.github.com/repos/sinatra/sinatra/issues/comments/267202783","html_url":"https://github.com/sinatra/sinatra/issues/1204#issuecomment-267202783","issue_url":"https://api.github.com/repos/sinatra/sinatra/issues/1204","id":267202783,"user":{"login":"tamoyal","id":46859,"avatar_url":"https://avatars.githubusercontent.com/u/46859?v=3","gravatar_id":"","url":"https://api.github.com/users/tamoyal","html_url":"https://github.com/tamoyal","followers_url":"https://api.github.com/users/tamoyal/followers","following_url":"https://api.github.com/users/tamoyal/following{/other_user}","gists_url":"https://api.github.com/users/tamoyal/gists{/gist_id}","starred_url":"https://api.github.com/users/tamoyal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tamoyal/subscriptions","organizations_url":"https://api.github.com/users/tamoyal/orgs","repos_url":"https://api.github.com/users/tamoyal/repos","events_url":"https://api.github.com/users/tamoyal/events{/privacy}","received_events_url":"https://api.github.com/users/tamoyal/received_events","type":"User","site_admin":false},"created_at":"2016-12-15T00:45:20Z","updated_at":"2016-12-15T00:45:20Z","body":"@zzak Yo! Amnesia has already set in on this issue but I remember it being more of an aggressive duck typing issue that a setting doesn't resolve but catching the right exceptions from the library did. You may want to take a look at the sample project I posted"}}
{"actor":{"display_login":"tamoyal"}}