From 5d419e5271b309af27588c6b53e8bea6c2ae7966 Mon Sep 17 00:00:00 2001 From: bromnhub <241785706+bromnhub@users.noreply.github.com> Date: Sat, 13 Dec 2025 05:01:00 -0500 Subject: [PATCH] refactor: Improve error handling in create_web_call function --- vapi_python/vapi_python.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vapi_python/vapi_python.py b/vapi_python/vapi_python.py index 69e9797..18b3b5f 100644 --- a/vapi_python/vapi_python.py +++ b/vapi_python/vapi_python.py @@ -19,7 +19,7 @@ def create_web_call(api_url, api_key, payload): web_call_url = data.get('webCallUrl') return call_id, web_call_url else: - raise Exception(f"Error: {data['message']}") + raise Exception(f"Error creating web call (Status {response.status_code}): {data.get('message', 'Unknown error')}") class Vapi: