Skip to content

Commit

Permalink
retry GitHub requests on timeout error
Browse files Browse the repository at this point in the history
  • Loading branch information
mamantoha committed Dec 4, 2024
1 parent 68df60a commit bf2b68c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lib/github/api.cr
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ module Github
end

def make_request(url)
client[url].get
Retriable.retry(on: {IO::TimeoutError}) do
client[url].get
end
ensure
client.http_client.close
end
Expand Down

0 comments on commit bf2b68c

Please sign in to comment.