From e7f4a725a81352e1c15cf48ee1d883ef19709542 Mon Sep 17 00:00:00 2001 From: bromnhub <241785706+bromnhub@users.noreply.github.com> Date: Fri, 12 Dec 2025 05:07:09 -0500 Subject: [PATCH] refactor: Improve error message handling in web call creation --- 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..0725412 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: {data.get('message', 'Unknown error')}") class Vapi: