Permalink
Browse files

ibrowse-style http request results

  • Loading branch information...
1 parent c6a7e0b commit 25a955650e670febeb3ca223dbb8b2c9ca4b27e7 @wagerlabs committed Apr 10, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/ddb_aws.erl
View
@@ -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} ->

0 comments on commit 25a9556

Please sign in to comment.