Skip to content

Commit

Permalink
ibrowse-style http request results
Browse files Browse the repository at this point in the history
  • Loading branch information
joelreymont committed Apr 10, 2012
1 parent c6a7e0b commit 25a9556
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ddb_aws.erl
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ retry(F, Max, N, H)
is_function(H) ->
backoff(N),
case F() of
{'ok', {{_, 200, _}, _, Body}} ->
{ok, "200", _, Body} ->
{'ok', H(Body)};
{'ok', {{_, Code, _}, _, Body}} when Code >= 400 andalso Code =< 500 ->
{ok, Code, _, Body} when Code >= "400" andalso Code =< "500" ->
ok = lager:error("Got client error (~s) ~p, aborting...", [Code, Body]),
{'error', H(Body)};
{'ok', {{_, Code, _}, _, Body}} ->
{'ok', Code, _, Body} ->
ok = lager:warning("Unexpected response (~s) ~p, retrying...", [Code, Body]),
retry(F, Max, N + 1, H);
{'error', Error} ->
Expand Down

0 comments on commit 25a9556

Please sign in to comment.