It seems that the request function from HTTP.jl already offers something similar (as it should), see the "Connection Pool options", "Timeout options", and "Retry options" from here. I am testing what are the differences between them by turning off my wifi, lol.
When the arxiv is down or if there is any issue with the api call let's catch this and throw an error message.