rescue
e ->
Logger.error("Error occured while handling activity")
+ Logger.error(xml_string)
Logger.error(inspect(e))
nil
end
end
def fetch_activity_from_url(url) do
- with {:ok, activities} <- fetch_activity_from_atom_url(url) do
+ with {:ok, activities} when length(activities) > 0 <- fetch_activity_from_atom_url(url) do
{:ok, activities}
else
_e -> with {:ok, activities} <- fetch_activity_from_html_url(url) do