mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-01-10 07:18:10 -05:00
chore: improve logging for "not a git repository" (#7944)
This commit is contained in:
@@ -202,6 +202,11 @@ async def git_changes(request: Request, conversation_id: str):
|
||||
|
||||
try:
|
||||
changes = await call_sync_from_async(runtime.get_git_changes, cwd)
|
||||
if changes is None:
|
||||
return JSONResponse(
|
||||
status_code=500,
|
||||
content={'error': 'Not a git repository'},
|
||||
)
|
||||
return changes
|
||||
except AgentRuntimeUnavailableError as e:
|
||||
logger.error(f'Runtime unavailable: {e}')
|
||||
|
||||
Reference in New Issue
Block a user