Skip to content

Commit

Permalink
Merge pull request #6 from thalesmg/retry-5xx
Browse files Browse the repository at this point in the history
feat: retry any 5xx error
  • Loading branch information
thalesmg authored Jan 22, 2025
2 parents 43263bb + c010aad commit a37af9d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/coveralls.erl
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ send(Json, #s{poster=Poster, poster_init=Init} = S, AttemptsLeft) ->
case ReturnCode of
200 ->
ok;
_ when ReturnCode == 502; ReturnCode == 520 ->
_ when 500 =< ReturnCode andalso ReturnCode < 600 ->
case AttemptsLeft > 0 of
true -> timer:sleep(1_000), send(Json, S, AttemptsLeft - 1);
false -> throw({error, {ReturnCode, Message}})
Expand Down

0 comments on commit a37af9d

Please sign in to comment.