AutoFix RuboCop Style/RescueStandardError

This commit is contained in:
Pieter Oliver 2025-07-08 17:17:45 +01:00
parent 5eea5ab218
commit 5e78a32bfe
No known key found for this signature in database
GPG key ID: AAC5BA1478582D1F
2 changed files with 1 additions and 9 deletions

View file

@ -236,14 +236,6 @@ Style/RedundantPercentQ:
Exclude:
- 'grape_logging.gemspec'
# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyle.
# SupportedStyles: implicit, explicit
Style/RescueStandardError:
Exclude:
- 'lib/grape_logging/loggers/response.rb'
# Offense count: 3
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods, MaxChainLength.

View file

@ -15,7 +15,7 @@ module GrapeLogging
# Rack responses
begin
response.body.map { |body| JSON.parse(body.to_s) }
rescue # No reason to have "=> e" here when we don't use it..
rescue StandardError # No reason to have "=> e" here when we don't use it..
response.body
end
else