diff --git a/lib/camel_patrol/middleware.rb b/lib/camel_patrol/middleware.rb
index <HASH>..<HASH> 100644
--- a/lib/camel_patrol/middleware.rb
+++ b/lib/camel_patrol/middleware.rb
@@ -17,14 +17,17 @@ module CamelPatrol
     def underscore_params(env)
       if ::Rails::VERSION::MAJOR < 5
         env["action_dispatch.request.request_parameters"].deep_transform_keys!(&:underscore)
-      else
-        request_body = JSON.parse(env["rack.input"].read)
-        request_body.deep_transform_keys!(&:underscore)
-        req = StringIO.new(request_body.to_json)
+        return
+      end
 
-        env["rack.input"] = req
-        env["CONTENT_LENGTH"] = req.length
+      if !(request_body = safe_json_parse(env["rack.input"].read))
+        return
       end
+
+      request_body.deep_transform_keys!(&:underscore)
+      req = StringIO.new(request_body.to_json)
+      env["rack.input"] = req
+      env["CONTENT_LENGTH"] = req.length
     end
 
     def camelize_response(response)
Abort translation on parse errors

For requests, we should abort translating key format if a parsing error
occurs due to invalid json. Let the request continue untouched, similar
to the scenario when content-type header is missing

It shouldn't be this middleware's responcibility to deal with invalid
json. The app server can handle these scenarios on a case by case basis

<URL>