parent
98a17edc90
commit
631b16ef86
|
@ -32,7 +32,7 @@ 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
|
return { errors: [I18n.t('not_found')] } if obj.is_a?(HasErrors) && 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