include docker error reason in sandbox start failure response

This commit is contained in:
Азамат Нураев 2026-05-05 10:04:58 +03:00
parent d4434a0afe
commit 32793de992
3 changed files with 6 additions and 4 deletions

View file

@ -70,9 +70,10 @@ def create_sandbox(
detail=str(exc),
) from exc
except SandboxStartError as exc:
detail = f'{exc}: {exc.reason}' if exc.reason else str(exc)
raise HTTPException(
status_code=status.HTTP_503_SERVICE_UNAVAILABLE,
detail=str(exc),
detail=detail,
) from exc
except SandboxError as exc:
raise HTTPException(