Skip to content

Commit

Permalink
PA-757: WIP on create website CLI. by Sam, Nina
Browse files Browse the repository at this point in the history
  • Loading branch information
ninakahr committed Sep 24, 2024
1 parent 0314667 commit 80e3914
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pythonanywhere_core/website.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ def create(self, domain_name: str, command: str) -> dict:
"webapp": {"command": command}
}
)
if not response.ok or response.json().get("status") == "ERROR":
raise PythonAnywhereApiException(f"POST to create webapp via API failed, got {response}:{response.text}")
return response.json()

def get(self, domain_name: str) -> dict:
Expand Down

0 comments on commit 80e3914

Please sign in to comment.