fix: log detailed error messages in repository preflight and clone
This commit is contained in:
@@ -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}",
|
||||
|
||||
Reference in New Issue
Block a user