From a2f263e0811867e824819335e6caa09bec6526fb Mon Sep 17 00:00:00 2001 From: Carlos Chitty Date: Wed, 26 Mar 2025 12:50:43 -0400 Subject: [PATCH] User Rails.env.local? https://github.com/rails/rails/pull/46786 Solves rubocop failure in rails 7.1 bump branch https://github.com/openfoodfoundation/openfoodnetwork/actions/runs/14739687970/job/41374340281?pr=13232 --- app/controllers/api/v1/base_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/v1/base_controller.rb b/app/controllers/api/v1/base_controller.rb index f1e5e992fb..15a75cc0d1 100644 --- a/app/controllers/api/v1/base_controller.rb +++ b/app/controllers/api/v1/base_controller.rb @@ -54,7 +54,7 @@ module Api def error_during_processing(exception) Alert.raise(exception) - if Rails.env.development? || Rails.env.test? + if Rails.env.local? render status: :unprocessable_entity, json: json_api_error(exception.message, meta: exception.backtrace) else