MCPcopy Create free account
hub / github.com/HumeAI/hume-api-examples / on_error

Method on_error

evi/evi-python-function-calling/main.py:160–168  ·  view source on GitHub ↗

Logic invoked when an error occurs in the WebSocket connection. See the full list of errors [here](https://dev.hume.ai/docs/resources/errors). Args: error (Exception): The error that occurred during the WebSocket communication.

(self, error)

Source from the content-addressed store, hash-verified

158 print("WebSocket connection closed.")
159
160 async def on_error(self, error):
161 """Logic invoked when an error occurs in the WebSocket connection.
162
163 See the full list of errors [here](https://dev.hume.ai/docs/resources/errors).
164
165 Args:
166 error (Exception): The error that occurred during the WebSocket communication.
167 """
168 print(f"Error: {error}")
169
170async def fetch_weather(location: str, format: str) -> str:
171 """Fetch the weather forecast for all periods for a given location.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected