From 9d4415962d3e4a0dbea33399aa679807b1a80ed8 Mon Sep 17 00:00:00 2001 From: Nina Kahr Date: Tue, 24 Sep 2024 11:19:42 +0100 Subject: [PATCH] PA-757: WIP on create website CLI. by Sam, Nina --- pythonanywhere_core/website.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pythonanywhere_core/website.py b/pythonanywhere_core/website.py index 57c8623..a92b406 100644 --- a/pythonanywhere_core/website.py +++ b/pythonanywhere_core/website.py @@ -38,6 +38,8 @@ def create(self, domain_name: str, command: str) -> dict: "webapp": {"command": command} } ) + if not response.ok: + raise PythonAnywhereApiException(f"POST to create webapp via API failed, got {response}:{response.text}") return response.json() def get(self, domain_name: str) -> dict: