mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
generate-integration-docs-screenshot: Message to run dev server.
If the dev server is not running, when this tool is run, we print a clear error message to start the dev server first, and then run this tool.
This commit is contained in:
committed by
Tim Abbott
parent
874e473fc4
commit
ae754887eb
@@ -102,7 +102,12 @@ def send_bot_payload_message(bot: UserProfile, integration: WebhookIntegration,
|
||||
data = ujson.load(f)
|
||||
_, fixture_name = split_fixture_path(fixture_path)
|
||||
headers = get_requests_headers(integration.name, fixture_name)
|
||||
response = requests.post(url, json=data, headers=headers)
|
||||
try:
|
||||
response = requests.post(url, json=data, headers=headers)
|
||||
except requests.exceptions.ConnectionError:
|
||||
print('This tool needs the local dev server to be running. '
|
||||
'Please start it using tools/run-dev.py before running this tool.')
|
||||
sys.exit(1)
|
||||
if response.status_code != 200:
|
||||
print(response.json())
|
||||
print('Failed to trigger webhook')
|
||||
|
Reference in New Issue
Block a user