From ed85cbd932c47cbcf05e706e04ef824236cd8d2f Mon Sep 17 00:00:00 2001 From: Benjamin Labrecque Date: Thu, 9 Jul 2026 14:50:38 +0200 Subject: [PATCH] chore: update ui service manager of new service --- cli/src/core/git.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cli/src/core/git.py b/cli/src/core/git.py index 4db5a9a..71fefed 100644 --- a/cli/src/core/git.py +++ b/cli/src/core/git.py @@ -47,7 +47,7 @@ def git_push_changes( logger.info(f"Pushing branch '{branch_name}' to origin...") origin = repo.remote(name="origin") origin.push(refspec=f"{branch_name}:{branch_name}").raise_if_error() - except Exception as e: + except git.GitCommandError as e: logger.error(f"Push failed due to an error: {e}") logger.info("Rolling back local Git index changes...") @@ -64,7 +64,8 @@ def git_push_changes( repo.index.reset(paths=files_to_stage) logger.info("Staging area successfully reset to clean state.") - raise e + error_reason = e.stderr.strip() if e.stderr else "Unknown remote error" + raise RuntimeError(f"Failed to push to git due to: {error_reason}") logger.info("Successfully pushed!")