Group Honeybadger Rack::Timeout::RequestTimeoutExceptions (#5231) [deploy]
This commit is contained in:
parent
771fa5b782
commit
9638e3da26
2 changed files with 12 additions and 0 deletions
|
|
@ -17,6 +17,8 @@ Honeybadger.configure do |config|
|
|||
notice.error_message
|
||||
elsif notice.error_message&.include?("BANNED")
|
||||
"banned"
|
||||
elsif notice.error_message&.include?("Rack::Timeout::RequestTimeoutException")
|
||||
"rack_timeout"
|
||||
elsif notice.component&.include?("internal")
|
||||
"internal"
|
||||
end
|
||||
|
|
|
|||
|
|
@ -21,6 +21,16 @@ describe Honeybadger do
|
|||
end
|
||||
end
|
||||
|
||||
context "when Rack::Timeout::RequestTimeoutException is raised" do
|
||||
it "sets fingerprint to rack_timeout" do
|
||||
notice = Honeybadger::Notice.new(
|
||||
described_class.config, error_message: "Rack::Timeout::RequestTimeoutException happened"
|
||||
)
|
||||
described_class.config.before_notify_hooks.first.call(notice)
|
||||
expect(notice.fingerprint).to eq("rack_timeout")
|
||||
end
|
||||
end
|
||||
|
||||
context "when error is raised from an internal route" do
|
||||
it "halts notification" do
|
||||
notice = Honeybadger::Notice.new(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue