Add fallback handler for unknown response codes
This commit is contained in:
parent
2c06b785c9
commit
66f7206b47
|
@ -36,6 +36,9 @@ defmodule Frenzy.HTTP do
|
||||||
{:ok, %HTTPoison.Response{status_code: 404}} ->
|
{:ok, %HTTPoison.Response{status_code: 404}} ->
|
||||||
{:error, "404 Not Found"}
|
{:error, "404 Not Found"}
|
||||||
|
|
||||||
|
{:ok, %HTTPoison.Response{status_code}} ->
|
||||||
|
{:error, "HTTP #{status_code}"}
|
||||||
|
|
||||||
{:error, %HTTPoison.Error{reason: reason}} ->
|
{:error, %HTTPoison.Error{reason: reason}} ->
|
||||||
{:error, reason}
|
{:error, reason}
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue