do not use exceptions for code flow

I have to admit that I personally would not even care about this error condition, as I'd expect my errors to listen to :identifier
pull/3030/head
Jan Sandbrink 9 years ago
parent 173fc83ec0
commit 6b1bda3389
  1. 2
      lib/api/v3/errors/error_representer.rb

@ -57,7 +57,7 @@ module API
def error_identifier
return 'urn:openproject-org:api:v3:errors:MultipleErrors' unless Array(represented.errors).empty?
represented.class.identifier rescue nil
represented.class.identifier if represented.class.respond_to?(:identifier)
end
end
end

Loading…
Cancel
Save