def _wrap_exception(self, error: BaseException) -> BaseException:
        """Wraps exceptions to provide more meaningful error messages.

        Args:
            error: The original exception.

        Returns:
            The wrapped exception or the original exception if no wrapping is needed.
        """
        if isinstance(error, APIExceptionLike):
            error_code = _get_error_code_from_api_exception(error)
            if error_code == ApiErrorCode.DATASET_UNKNOWN:
                return DatasetNotFoundError(
                    "Dataset has suddenly disappeared and cannot be found. Did you delete it?"
                )

        return error
Wraps exceptions to provide more meaningful error messages.

        Args:
            error: The original exception.

        Returns:
            The wrapped exception or the original exception if no wrapping is needed.
        
lightly/api/retry_utils.py