From 5e78a32bfe2f90a7284a6c5d610f3d7e59fe1340 Mon Sep 17 00:00:00 2001 From: Pieter Oliver Date: Tue, 8 Jul 2025 17:17:45 +0100 Subject: [PATCH] AutoFix RuboCop Style/RescueStandardError --- .rubocop_todo.yml | 8 -------- lib/grape_logging/loggers/response.rb | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 40fbfbc..8ec8041 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -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. diff --git a/lib/grape_logging/loggers/response.rb b/lib/grape_logging/loggers/response.rb index 307d721..9bff5f3 100644 --- a/lib/grape_logging/loggers/response.rb +++ b/lib/grape_logging/loggers/response.rb @@ -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