FIX: Avoid logging a warn for 404s.
This commit is contained in:
parent
f74565f23b
commit
25453eb922
|
@ -32,6 +32,8 @@ module JsonError
|
||||||
return { errors: [message] } if message.present?
|
return { errors: [message] } if message.present?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
return { errors: [I18n.t('not_found')] } if obj.not_found
|
||||||
|
|
||||||
# Log a warning (unless obj is nil)
|
# Log a warning (unless obj is nil)
|
||||||
Rails.logger.warn("create_errors_json called with unrecognized type: #{obj.inspect}") if obj
|
Rails.logger.warn("create_errors_json called with unrecognized type: #{obj.inspect}") if obj
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue