Skip to content

Commit

Permalink
fix(Handler): add handle_header clause for connection failures
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaceEEC committed Jul 17, 2018
1 parent 81c552e commit 6493795
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/rest/handler/handler.ex
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ defmodule Crux.Rest.Handler do
handle_response(tuple, state, reset)
end

defp handle_headers({:error, _} = tuple, state), do: handle_response(tuple, state, nil)

# Rate limited
defp handle_response(
{:ok, %HTTPoison.Response{headers: headers, status_code: 429, body: body}},
Expand Down

0 comments on commit 6493795

Please sign in to comment.