Add default HTTP response handler

This commit is contained in:
Shadowfacts 2019-09-26 11:59:44 -04:00
parent bd896641df
commit 27dd2c4a8e
Signed by: shadowfacts
GPG Key ID: 94A5AB95422746E5
1 changed files with 3 additions and 0 deletions

View File

@ -101,6 +101,9 @@ defmodule Frenzy.UpdateFeeds do
{:ok, feed} = Repo.update(changeset)
update_feed(feed)
{:ok, %HTTPoison.Response{} = response} ->
Logger.error("Couldn't load RSS feed #{feed.feed_url}, got unexpected response: #{inspect(response)}")
{:error, %HTTPoison.Error{reason: reason}} ->
Logger.error("Couldn't load RSS feed #{feed.feed_url}: #{inspect(reason)}")
end