lib/yao/resources/restfully_accessible.rb in yao-0.13.0 vs lib/yao/resources/restfully_accessible.rb in yao-0.13.1

- old
+ new

@@ -209,9 +209,11 @@ rescue => e raise e unless e.class == Yao::ItemNotFound || e.class == Yao::NotFound item = find_by_name(name) if item.size > 1 raise Yao::TooManyItemFonud.new("More than one resource exists with the name '#{name}'") + elsif item.size.zero? + raise Yao::InvalidResponse.new("No resource exists with the name '#{name}'") end GET(create_url(item.first.id), query) end end end