wip commit

This commit is contained in:
David Kennedy 2023-09-21 12:17:57 -04:00
parent 4db5b94b36
commit 34106286a6
No known key found for this signature in database
GPG key ID: 6528A5386E66B96B
4 changed files with 48 additions and 5 deletions

View file

@ -67,6 +67,9 @@ class RegistryError(Exception):
def should_retry(self):
return self.code == ErrorCode.COMMAND_FAILED
def is_session_error(self):
return self.code is not None and (self.code >= 2501 and self.code <= 2502)
def is_server_error(self):
return self.code is not None and (self.code >= 2400 and self.code <= 2500)