{"action":"created","issue":{"url":"https://api.github.com/repos/sinatra/sinatra/issues/721","labels_url":"https://api.github.com/repos/sinatra/sinatra/issues/721/labels{/name}","comments_url":"https://api.github.com/repos/sinatra/sinatra/issues/721/comments","events_url":"https://api.github.com/repos/sinatra/sinatra/issues/721/events","html_url":"https://github.com/sinatra/sinatra/issues/721","id":14988264,"number":721,"title":"Stacktraces from middleware swallowed with show exceptions","user":{"login":"ahawkins","id":48928,"avatar_url":"https://avatars.githubusercontent.com/u/48928?v=3","gravatar_id":"","url":"https://api.github.com/users/ahawkins","html_url":"https://github.com/ahawkins","followers_url":"https://api.github.com/users/ahawkins/followers","following_url":"https://api.github.com/users/ahawkins/following{/other_user}","gists_url":"https://api.github.com/users/ahawkins/gists{/gist_id}","starred_url":"https://api.github.com/users/ahawkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahawkins/subscriptions","organizations_url":"https://api.github.com/users/ahawkins/orgs","repos_url":"https://api.github.com/users/ahawkins/repos","events_url":"https://api.github.com/users/ahawkins/events{/privacy}","received_events_url":"https://api.github.com/users/ahawkins/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sinatra/sinatra/labels/feedback","name":"feedback","color":"c7def8"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2013-05-31T10:55:02Z","updated_at":"2015-02-13T16:39:25Z","closed_at":null,"body":"If `show_exceptions` is set and error is thrown from middleware, the stack trace is swallowed. I'm fairly sure this because of this here: https://github.com/sinatra/sinatra/blob/master/lib/sinatra/showexceptions.rb#L11\r\n\r\nHere's an example:\r\n\r\n```\r\n# config.ru\r\nclass ErrorTest\r\n  def initialize(app)\r\n  end\r\n\r\n  def call(env)\r\n    raise \"test!\"\r\n  end\r\nend\r\n\r\nclass Server < Sinatra::Application\r\n   use ErrorTest\r\nend\r\n\r\nrun Server\r\n```\r\n\r\nRackup the file. Sinatra will server the 500 page but the trace is missing from the log. I'm not sure if this is a bug or not. It's a weird behavior. If the error is raised inside the sinatra app itself, the stack will appear in the log."},"comment":{"url":"https://api.github.com/repos/sinatra/sinatra/issues/comments/74283219","html_url":"https://github.com/sinatra/sinatra/issues/721#issuecomment-74283219","issue_url":"https://api.github.com/repos/sinatra/sinatra/issues/721","id":74283219,"user":{"login":"zzak","id":277819,"avatar_url":"https://avatars.githubusercontent.com/u/277819?v=3","gravatar_id":"","url":"https://api.github.com/users/zzak","html_url":"https://github.com/zzak","followers_url":"https://api.github.com/users/zzak/followers","following_url":"https://api.github.com/users/zzak/following{/other_user}","gists_url":"https://api.github.com/users/zzak/gists{/gist_id}","starred_url":"https://api.github.com/users/zzak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zzak/subscriptions","organizations_url":"https://api.github.com/users/zzak/orgs","repos_url":"https://api.github.com/users/zzak/repos","events_url":"https://api.github.com/users/zzak/events{/privacy}","received_events_url":"https://api.github.com/users/zzak/received_events","type":"User","site_admin":false},"created_at":"2015-02-13T16:39:25Z","updated_at":"2015-02-13T16:39:25Z","body":"Marking this ticket for feedback, if no one can reproduce this issue in a reasonable amount of time we should close it."}}