Skip to content

Commit

Permalink
Mention path in text response
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinDaugherty committed Oct 31, 2020
1 parent 65c562c commit 931ffa0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions lib/better_errors/templates/text.erb
@@ -1,7 +1,10 @@
<%== text_heading("=", "%s at %s" % [exception_type, request_path]) %>
> <%== exception_message %>
<% if backtrace_frames.any? %>
<%== exception_message %>

> To access an interactive console with this error, point your browser to: /__better_errors

<% if backtrace_frames.any? -%>
<%== text_heading("-", "%s, line %i" % [first_frame.pretty_path, first_frame.line]) %>

Expand Down
4 changes: 2 additions & 2 deletions spec/better_errors/middleware_spec.rb
Expand Up @@ -147,8 +147,8 @@ module BetterErrors

it "shows the exception as-is" do
expect(status).to eq(500)
expect(body).to match(/\n> Second Exception\n/)
expect(body).not_to match(/\n> First Exception\n/)
expect(body).to match(/\nSecond Exception\n/)
expect(body).not_to match(/\nFirst Exception\n/)
end
end

Expand Down

0 comments on commit 931ffa0

Please sign in to comment.