From a7c8278866504a74bdc832cf90c281663f0a925c Mon Sep 17 00:00:00 2001 From: Beth Skurrie Date: Mon, 11 Sep 2023 08:36:09 +1000 Subject: [PATCH] Add any successfully parsed non-nil JSON body to report, regardless of class --- lib/bugsnag/middleware/rack_request.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/bugsnag/middleware/rack_request.rb b/lib/bugsnag/middleware/rack_request.rb index 387e5df4..63bff078 100644 --- a/lib/bugsnag/middleware/rack_request.rb +++ b/lib/bugsnag/middleware/rack_request.rb @@ -109,7 +109,7 @@ def add_request_body(report, request, env) body = parsed_request_body(request, env) # this request may not have a body - return unless body.is_a?(Hash) && !body.empty? + return if body.nil? report.add_metadata(:request, :body, body) end