handling 99 error message

This commit is contained in:
David Kennedy 2023-09-26 10:31:08 -04:00
parent 51375059c1
commit 74c7e6528f
No known key found for this signature in database
GPG key ID: 6528A5386E66B96B
2 changed files with 10 additions and 0 deletions

View file

@ -67,6 +67,10 @@ class RegistryError(Exception):
def should_retry(self):
return self.code == ErrorCode.COMMAND_FAILED
# connection errors have error code of None and [Errno 99] in the err message
def is_connection_error(self):
return self.code is None
def is_session_error(self):
return self.code is not None and (self.code >= 2501 and self.code <= 2502)