Fix missing clause in scrape stage

This commit is contained in:
Shadowfacts 2021-10-22 16:20:50 -04:00
parent b1c0ba3998
commit e3ec1d6040
Signed by: shadowfacts
GPG Key ID: 94A5AB95422746E5
1 changed files with 3 additions and 0 deletions

View File

@ -73,6 +73,9 @@ defmodule Frenzy.Pipeline.ScrapeStage do
{:ok, %Tesla.Env{status: code} = response} when code in 200..299 ->
handle_response(url, response, opts)
{:ok, %Tesla.Env{status: code}} ->
{:error, "Unexpected HTTP code #{code}"}
{:error, reason} ->
{:error, "Couldn't scrape article: #{reason}"}
end