include docker error reason in sandbox start failure response
This commit is contained in:
parent
d4434a0afe
commit
32793de992
3 changed files with 6 additions and 4 deletions
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue