diff --git a/web/api.py b/web/api.py index 189b9b2..4c245f2 100644 --- a/web/api.py +++ b/web/api.py @@ -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: