lib/podcast_index/podcast.rb in podcast_index-0.2.0 vs lib/podcast_index/podcast.rb in podcast_index-0.2.1

- old
+ new

@@ -8,9 +8,11 @@ FIND_ONE_ATTRIBUTES = %i[feed_url guid itunes_id].freeze FIND_MANY_ATTRIBUTES = %i[tag medium term title trending dead recent new newly_found].freeze def find(id) response = Api::Podcasts.by_feed_id(id: id) + raise PodcastIndex::PodcastNotFound, response["description"] if response["feed"].empty? + from_response(response) end def find_by(attributes) match = (attributes.keys & FIND_ONE_ATTRIBUTES)