Retry connection for 502 Bad Gateway (OpenURI::HTTPError)