Exceptions¶
-
exception
py42.exceptions.Py42ActiveLegalHoldError(exception, resource, resource_id)¶ Bases:
py42.exceptions.Py42BadRequestErrorAn exception raised when attempting to deactivate a user or device that is in an active legal hold.
-
response¶ The response prior to the error.
-
with_traceback()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
py42.exceptions.Py42ArchiveFileNotFoundError(response, device_guid, file_path)¶ Bases:
py42.exceptions.Py42ResponseErrorAn exception raised when a resource file is not found or the path is invalid.
-
response¶ The response prior to the error.
-
with_traceback()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
py42.exceptions.Py42BadRequestError(exception, message=None)¶ Bases:
py42.exceptions.Py42HTTPErrorA wrapper to represent an HTTP 400 error.
-
response¶ The response prior to the error.
-
with_traceback()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
py42.exceptions.Py42BadRestoreRequestError(exception)¶ Bases:
py42.exceptions.Py42BadRequestErrorAn error raised when the given restore arguments are not compatible and cause a bad request.
-
response¶ The response prior to the error.
-
with_traceback()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
py42.exceptions.Py42CaseAlreadyHasEventError(exception)¶ Bases:
py42.exceptions.Py42BadRequestErrorAn error raised when event is already associated to the case.
-
response¶ The response prior to the error.
-
with_traceback()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
py42.exceptions.Py42CaseNameExistsError(exception, case_name)¶ Bases:
py42.exceptions.Py42BadRequestErrorAn error raised when trying to create a case with a name that already exists.
-
response¶ The response prior to the error.
-
with_traceback()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
py42.exceptions.Py42ChecksumNotFoundError(response, checksum_name, checksum_value)¶ Bases:
py42.exceptions.Py42ResponseErrorAn exception raised when a user-supplied hash could not successfully locate its corresponding resource.
-
response¶ The response prior to the error.
-
with_traceback()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
py42.exceptions.Py42CloudAliasLimitExceededError(exception, message=None)¶ Bases:
py42.exceptions.Py42BadRequestErrorAn Exception raised when trying to add a cloud alias to a user when that user already has the max amount of supported cloud aliases.
-
response¶ The response prior to the error.
-
with_traceback()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
py42.exceptions.Py42DescriptionLimitExceededError(exception)¶ Bases:
py42.exceptions.Py42BadRequestErrorAn error raised when description of a case exceeds the allowed char length limit.
-
response¶ The response prior to the error.
-
with_traceback()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
py42.exceptions.Py42DeviceNotConnectedError(response, device_guid)¶ Bases:
py42.exceptions.Py42ResponseErrorAn exception raised when trying to push a restore to a device that is not connected to an Authority server.
-
response¶ The response prior to the error.
-
with_traceback()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
py42.exceptions.Py42Error¶ Bases:
ExceptionA generic, Py42 custom base exception.
-
with_traceback()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
Bases:
py42.exceptions.Py42ResponseErrorAn exception raised when a requested feature is not supported in your Code42 environment.
The response prior to the error.
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
exception
py42.exceptions.Py42ForbiddenError(exception, message=None)¶ Bases:
py42.exceptions.Py42HTTPErrorA wrapper to represent an HTTP 403 error.
-
response¶ The response prior to the error.
-
with_traceback()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
py42.exceptions.Py42HTTPError(exception, message=None)¶ Bases:
py42.exceptions.Py42ResponseErrorA base custom class to manage all HTTP errors raised by an API endpoint.
-
response¶ The response prior to the error.
-
with_traceback()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
py42.exceptions.Py42InternalServerError(exception, message=None)¶ Bases:
py42.exceptions.Py42HTTPErrorA wrapper to represent an HTTP 500 error.
-
response¶ The response prior to the error.
-
with_traceback()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
py42.exceptions.Py42InvalidArchiveEncryptionKey(exception)¶ Bases:
py42.exceptions.Py42HTTPErrorAn exception raised the encryption key for an archive is invalid.
-
response¶ The response prior to the error.
-
with_traceback()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
py42.exceptions.Py42InvalidArchivePassword(exception)¶ Bases:
py42.exceptions.Py42HTTPErrorAn exception raised when the password for unlocking an archive is invalid.
-
response¶ The response prior to the error.
-
with_traceback()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
py42.exceptions.Py42InvalidCaseUserError(exception, user_field)¶ Bases:
py42.exceptions.Py42BadRequestErrorAn error raised when a case subject or assignee is not a valid user.
-
response¶ The response prior to the error.
-
with_traceback()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
py42.exceptions.Py42InvalidPageTokenError(exception, page_token)¶ Bases:
py42.exceptions.Py42BadRequestErrorAn error raised when the page token given is invalid.
-
response¶ The response prior to the error.
-
with_traceback()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
py42.exceptions.Py42InvalidRuleError(exception, rule_id)¶ Bases:
py42.exceptions.Py42NotFoundErrorAn exception raised when the observer rule ID does not exist.
-
response¶ The response prior to the error.
-
with_traceback()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
py42.exceptions.Py42InvalidRuleOperationError(exception, rule_id, source)¶ Bases:
py42.exceptions.Py42HTTPErrorAn exception raised when trying to add or remove users to a system rule.
-
response¶ The response prior to the error.
-
with_traceback()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
py42.exceptions.Py42LegalHoldCriteriaMissingError(exception)¶ Bases:
py42.exceptions.Py42BadRequestErrorAn exception raised when a bad request was made to a Legal Hold endpoint.
-
response¶ The response prior to the error.
-
with_traceback()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
py42.exceptions.Py42LegalHoldNotFoundOrPermissionDeniedError(exception, matter_id)¶ Bases:
py42.exceptions.Py42ForbiddenErrorAn exception raised when a legal hold matter is inaccessible from your account or the matter ID is not valid.
-
response¶ The response prior to the error.
-
with_traceback()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
py42.exceptions.Py42MFARequiredError(exception, message=None)¶ Bases:
py42.exceptions.Py42UnauthorizedErrorAn exception raised when a request requires multi-factor authentication
-
response¶ The response prior to the error.
-
with_traceback()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
py42.exceptions.Py42NotFoundError(exception, message=None)¶ Bases:
py42.exceptions.Py42HTTPErrorA wrapper to represent an HTTP 404 error.
-
response¶ The response prior to the error.
-
with_traceback()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
py42.exceptions.Py42ResponseError(response, message)¶ Bases:
py42.exceptions.Py42ErrorA base custom class to manage all errors raised because of an HTTP response.
-
response¶ The response prior to the error.
-
with_traceback()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
py42.exceptions.Py42SecurityPlanConnectionError(exception, error_message)¶ Bases:
py42.exceptions.Py42HTTPErrorAn exception raised when the user is not authorized to access the requested resource.
-
response¶ The response prior to the error.
-
with_traceback()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
py42.exceptions.Py42SessionInitializationError(exception)¶ Bases:
py42.exceptions.Py42ErrorAn exception raised when a user connection is invalid. A connection might be invalid due to connection timeout, invalid token, etc.
-
with_traceback()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
py42.exceptions.Py42StorageSessionInitializationError(exception, error_message)¶ Bases:
py42.exceptions.Py42HTTPErrorAn exception raised when the user is not authorized to initialize a storage session. This may occur when trying to restore a file or trying to get events for file activity on removable media, in cloud sync folders, and browser uploads.
-
response¶ The response prior to the error.
-
with_traceback()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
py42.exceptions.Py42TooManyRequestsError(exception, message=None)¶ Bases:
py42.exceptions.Py42HTTPErrorA wrapper to represent an HTTP 429 error.
-
response¶ The response prior to the error.
-
with_traceback()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
Bases:
py42.exceptions.Py42HTTPErrorA wrapper to represent an HTTP 401 error.
The response prior to the error.
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
exception
py42.exceptions.Py42UpdateClosedCaseError(exception)¶ Bases:
py42.exceptions.Py42BadRequestErrorAn error raised when trying to update a closed case.
-
response¶ The response prior to the error.
-
with_traceback()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
py42.exceptions.Py42UserAlreadyAddedError(exception, user_id, list_name)¶ Bases:
py42.exceptions.Py42BadRequestErrorAn exception raised when the user is already added to group or list, such as the Departing Employee list.
-
response¶ The response prior to the error.
-
with_traceback()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
py42.exceptions.Py42UserAlreadyExistsError(exception, message=None)¶ Bases:
py42.exceptions.Py42InternalServerErrorAn exception raised when a user already exists
-
response¶ The response prior to the error.
-
with_traceback()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
py42.exceptions.Py42UserNotOnListError(exception, user_id, list_name)¶ Bases:
py42.exceptions.Py42NotFoundErrorAn exception raised when the user is not on a detection list.
-
response¶ The response prior to the error.
-
with_traceback()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
exception
py42.exceptions.Py42UsernameMustBeEmailError(exception)¶ Bases:
py42.exceptions.Py42InternalServerErrorAn exception raised when trying to set a non-email as a user’s username in a cloud environment.
-
response¶ The response prior to the error.
-
with_traceback()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
py42.exceptions.raise_py42_error(raised_error)¶ Raises the appropriate
py42.exceptions.Py42HttpErrorbased on the given HTTPError’s response status code.