2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-08-21 19:11:18 +08:00

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