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}} ->
|
||||
{:error, "404 Not Found"}
|
||||
|
||||
{:ok, %HTTPoison.Response{status_code}} ->
|
||||
{:error, "HTTP #{status_code}"}
|
||||
|
||||
{:error, %HTTPoison.Error{reason: reason}} ->
|
||||
{:error, reason}
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue