From 970e53a5a33bfc70fde80abe924ae7f4a1e4ab4a Mon Sep 17 00:00:00 2001 From: Pete Matsyburka Date: Thu, 24 Oct 2024 12:30:14 +0300 Subject: [PATCH] remove log --- app/controllers/api/api_base_controller.rb | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/app/controllers/api/api_base_controller.rb b/app/controllers/api/api_base_controller.rb index 514b2f3a..b681aa67 100644 --- a/app/controllers/api/api_base_controller.rb +++ b/app/controllers/api/api_base_controller.rb @@ -57,18 +57,13 @@ module Api object_name = error.subject.model_name.human id = error.subject.id - message = - if current_user.account.testing? - "#{object_name} #{id} not found using testing API key; Use production API key to " \ - "access production #{object_name.downcase.pluralize}." - else - "#{object_name} #{id} not found using production API key; Use testing API key to " \ - "access testing #{object_name.downcase.pluralize}." - end - - Rollbar.warning(message) if defined?(Rollbar) - - message + if current_user.account.testing? + "#{object_name} #{id} not found using testing API key; Use production API key to " \ + "access production #{object_name.downcase.pluralize}." + else + "#{object_name} #{id} not found using production API key; Use testing API key to " \ + "access testing #{object_name.downcase.pluralize}." + end end def paginate(relation, field: :id)