diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index a829bdc..dfecc96 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -93,13 +93,6 @@ Minitest/AssertRaisesCompoundBody: Minitest/MultipleAssertions: Max: 5 -# Offense count: 1 -# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames. -# AllowedNames: as, at, by, cc, db, id, if, in, io, ip, of, on, os, pp, to -Naming/MethodParameterName: - Exclude: - - 'app/controllers/graphql_controller.rb' - # Offense count: 6 # Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers, AllowedPatterns. # SupportedStyles: snake_case, normalcase, non_integer diff --git a/app/controllers/graphql_controller.rb b/app/controllers/graphql_controller.rb index 8d629d8..951a568 100644 --- a/app/controllers/graphql_controller.rb +++ b/app/controllers/graphql_controller.rb @@ -44,10 +44,10 @@ def prepare_variables(variables_param) end end - def handle_error_in_development(e) - logger.error e.message - logger.error e.backtrace.join("\n") + def handle_error_in_development(error) + logger.error error.message + logger.error error.backtrace.join("\n") - render json: { errors: [{ message: e.message, backtrace: e.backtrace }], data: {} }, status: :internal_server_error + render json: { errors: [{ message: error.message, backtrace: error.backtrace }], data: {} }, status: :internal_server_error end end