fix: log detailed error messages in repository preflight and clone

This commit is contained in:
2026-05-22 21:21:45 +00:00
parent 4ef0f108ea
commit ca8b255148
+3 -1
View File
@@ -153,9 +153,10 @@ def _preflight_remote_repository(remote_url: str, ssh_key: SSHKey | None = None)
os.unlink(key_path)
if result.returncode != 0:
logger.error("Preflight check failed for %s: stderr=%s", remote_url, result.stderr)
raise HTTPException(
status_code=status.HTTP_400_BAD_REQUEST,
detail="repository not found or inaccessible",
detail=f"repository not found or inaccessible: {result.stderr}",
)
@@ -185,6 +186,7 @@ def _clone_working_repository(remote_url: str, repo_path: str, ssh_key: SSHKey |
os.unlink(key_path)
if result.returncode != 0:
logger.error("Clone failed for %s: stderr=%s", remote_url, result.stderr)
raise HTTPException(
status_code=status.HTTP_400_BAD_REQUEST,
detail=f"failed to clone repository: {result.stderr}",