pull/381/head
Pete Matsyburka 1 year ago
parent 520bac2ec7
commit 970e53a5a3

@ -57,18 +57,13 @@ module Api
object_name = error.subject.model_name.human object_name = error.subject.model_name.human
id = error.subject.id id = error.subject.id
message = if current_user.account.testing?
if current_user.account.testing? "#{object_name} #{id} not found using testing API key; Use production API key to " \
"#{object_name} #{id} not found using testing API key; Use production API key to " \ "access production #{object_name.downcase.pluralize}."
"access production #{object_name.downcase.pluralize}." else
else "#{object_name} #{id} not found using production API key; Use testing API key to " \
"#{object_name} #{id} not found using production API key; Use testing API key to " \ "access testing #{object_name.downcase.pluralize}."
"access testing #{object_name.downcase.pluralize}." end
end
Rollbar.warning(message) if defined?(Rollbar)
message
end end
def paginate(relation, field: :id) def paginate(relation, field: :id)

Loading…
Cancel
Save