dheerajturaga commented on code in PR #56206:
URL: https://github.com/apache/airflow/pull/56206#discussion_r2430310312


##########
providers/git/src/airflow/providers/git/bundles/git.py:
##########
@@ -91,11 +93,21 @@ def _initialize(self):
         with self.lock():
             cm = self.hook.configure_hook_env() if self.hook else nullcontext()
             with cm:
-                self._clone_bare_repo_if_required()
+                try:
+                    self._clone_bare_repo_if_required()
+                except GitCommandError as e:
+                    raise AirflowException("Error cloning repository") from e
+                except InvalidGitRepositoryError as e:
+                    raise AirflowException(f"Invalid git repository at 
{self.bare_repo_path}") from e
                 self._ensure_version_in_bare_repo()
             self.bare_repo.close()
 
-            self._clone_repo_if_required()
+            try:
+                self._clone_repo_if_required()
+            except GitCommandError as e:
+                raise AirflowException("Error cloning repository") from e

Review Comment:
   Done! Please let me know if this can be merged



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to