FIX: Avoid logging a warn for 404s.

This commit is contained in:
Bianca Nenciu 2019-05-22 15:18:38 +03:00
parent f74565f23b
commit 25453eb922

View File

@ -32,6 +32,8 @@ module JsonError
return { errors: [message] } if message.present?
end
return { errors: [I18n.t('not_found')] } if obj.not_found
# Log a warning (unless obj is nil)
Rails.logger.warn("create_errors_json called with unrecognized type: #{obj.inspect}") if obj