Skip to content

Commit

Permalink
Give context to request error backtrace by showing REQUEST_METHOD and…
Browse files Browse the repository at this point in the history
… PATH_INFO as well
  • Loading branch information
jf committed Apr 11, 2016
1 parent 419d346 commit cbb793d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/puma/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,7 @@ def handle_request(req, lines)
res_body = ["Request was internally terminated early\n"]

rescue StandardError => e
STDERR.puts "#{Time.now}: error handling request: { #{ env['REQUEST_METHOD'] } #{ env['PATH_INFO'] } }:"
@events.unknown_error self, e, "Rack app"

status, headers, res_body = lowlevel_error(e, env)
Expand Down

0 comments on commit cbb793d

Please sign in to comment.