|
|
|
@ -57,7 +57,6 @@ 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}."
|
|
|
|
@ -65,10 +64,6 @@ module Api
|
|
|
|
"#{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)
|
|
|
|
|