mirror of
https://github.com/OpenHands/OpenHands.git
synced 2026-03-22 13:47:19 +08:00
Added fallback for sandbox spec service (#13317)
Co-authored-by: openhands <openhands@all-hands.dev>
This commit is contained in:
@@ -507,10 +507,11 @@ async def get_conversation_skills(
|
||||
sandbox.sandbox_spec_id
|
||||
)
|
||||
if not sandbox_spec:
|
||||
return JSONResponse(
|
||||
status_code=status.HTTP_404_NOT_FOUND,
|
||||
content={'error': 'Sandbox spec not found'},
|
||||
)
|
||||
# TODO: This is a temporary work around for the fact that we don't store previous
|
||||
# sandbox spec versions when updating OpenHands. When the SandboxSpecServices
|
||||
# transition to truly multi sandbox spec model this should raise a 404 error
|
||||
logger.warning('Sandbox spec not found - using default.')
|
||||
sandbox_spec = await sandbox_spec_service.get_default_sandbox_spec()
|
||||
|
||||
# Get the agent server URL
|
||||
if not sandbox.exposed_urls:
|
||||
|
||||
Reference in New Issue
Block a user