kin: KIN-BIZ-005 Убрать дублирование UI сред: SettingsView vs ProjectView

This commit is contained in:
Gros Frumos 2026-03-16 19:27:55 +02:00
parent a58578bb9d
commit 98d62266ba

View file

@ -1024,7 +1024,7 @@ def bootstrap(body: BootstrapRequest):
# Environments (KIN-087)
# ---------------------------------------------------------------------------
VALID_AUTH_TYPES = {"password", "key"}
VALID_AUTH_TYPES = {"password", "key", "ssh_key"}
class EnvironmentCreate(BaseModel):
@ -1167,6 +1167,8 @@ def create_environment(project_id: str, body: EnvironmentCreate):
conn.close()
if "UNIQUE constraint" in str(e):
raise HTTPException(409, f"Environment '{body.name}' already exists for this project")
if "KIN_SECRET_KEY" in str(e):
raise HTTPException(503, "Server misconfiguration: KIN_SECRET_KEY is not set. Contact admin.")
raise HTTPException(500, str(e))
scan_task_id = None
if body.is_installed: