Add fallback handler for unknown response codes

This commit is contained in:
Shadowfacts 2019-12-21 22:56:10 -05:00
parent 2c06b785c9
commit 66f7206b47
Signed by: shadowfacts
GPG Key ID: 94A5AB95422746E5
1 changed files with 3 additions and 0 deletions

View File

@ -36,6 +36,9 @@ defmodule Frenzy.HTTP do
{:ok, %HTTPoison.Response{status_code: 404}} ->
{:error, "404 Not Found"}
{:ok, %HTTPoison.Response{status_code}} ->
{:error, "HTTP #{status_code}"}
{:error, %HTTPoison.Error{reason: reason}} ->
{:error, reason}
end