Skip to content

Commit

Permalink
robustcheckout: retry on HTTP 5xx (Bug 1481291) r=sheehan
Browse files Browse the repository at this point in the history
Differential Revision: https://phabricator.services.mozilla.com/D182008

--HG--
extra : moz-landing-system : lando
  • Loading branch information
jcristau committed Jun 28, 2023
1 parent 6a484bc commit 459b682
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions hgext/robustcheckout/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,10 @@ def handlepullerror(e):
ui.warn(b"ssl error: %s\n" % pycompat.bytestr(str(e)))
handlenetworkfailure()
return True
elif isinstance(e, urllibcompat.urlerr.httperror) and e.code >= 500:
ui.warn(b"http error: %s\n" % pycompat.bytestr(str(e.reason)))
handlenetworkfailure()
return True
elif isinstance(e, urllibcompat.urlerr.urlerror):
if isinstance(e.reason, socket.error):
ui.warn(b"socket error: %s\n" % pycompat.bytestr(str(e.reason)))
Expand Down

0 comments on commit 459b682

Please sign in to comment.