mirror of
https://github.com/samsonjs/grape_logging.git
synced 2026-04-27 14:57:40 +00:00
AutoFix RuboCop Style/RescueStandardError
This commit is contained in:
parent
5eea5ab218
commit
5e78a32bfe
2 changed files with 1 additions and 9 deletions
|
|
@ -236,14 +236,6 @@ Style/RedundantPercentQ:
|
||||||
Exclude:
|
Exclude:
|
||||||
- 'grape_logging.gemspec'
|
- '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
|
# Offense count: 3
|
||||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||||
# Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods, MaxChainLength.
|
# Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods, MaxChainLength.
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ module GrapeLogging
|
||||||
# Rack responses
|
# Rack responses
|
||||||
begin
|
begin
|
||||||
response.body.map { |body| JSON.parse(body.to_s) }
|
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
|
response.body
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue