Skip to content

Commit

Permalink
Update src/utilities/request.jl
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
2 people authored and mattBrzezinski committed Mar 20, 2023
1 parent c4741ba commit f960817
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/utilities/request.jl
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,11 @@ function submit_request(aws::AbstractAWSConfig, request::Request; return_headers
end
end

check = function (s, e)
check = (s, e) -> begin
# Pass on non-AWS exceptions.
if !(e isa AWSException)
@debug "AWS.jl declined to retry non-AWSException" retry = false reason = "Non-AWSException" exception =
e
return false
end

Expand Down Expand Up @@ -220,7 +222,6 @@ function submit_request(aws::AbstractAWSConfig, request::Request; return_headers
end

delays = AWSExponentialBackoff(; max_attempts=max_attempts(aws))

retry(upgrade_error(get_response); check=check, delays=delays)()

if request.use_response_type
Expand Down

0 comments on commit f960817

Please sign in to comment.