Skip to content

Commit

Permalink
FIX: Fix build.
Browse files Browse the repository at this point in the history
Follow-up to 25453eb.
  • Loading branch information
nbianca committed May 22, 2019
1 parent 98a17ed commit 631b16e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/json_error.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def create_errors_array(obj)
return { errors: [message] } if message.present?
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)
Rails.logger.warn("create_errors_json called with unrecognized type: #{obj.inspect}") if obj
Expand Down

0 comments on commit 631b16e

Please sign in to comment.