From 52d9d3a0b41c6b30e5bf6e80c2392fb456b59f34 Mon Sep 17 00:00:00 2001 From: bromnhub <241785706+bromnhub@users.noreply.github.com> Date: Sun, 14 Dec 2025 05:02:09 -0500 Subject: [PATCH] refactor: Improve error handling in connection module --- 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..ae98dc6 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 {response.status_code}: {data.get('message', 'Unknown error')}") class Vapi: