You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running client.push_trace(request), got the error invariant_sdk.types.exceptions.InvariantError: Connection error when calling method: POST for path: /api/v1/push/trace. The complete traceback of errors is given as follows:
Traceback:
TimeoutError: The write operation timed out
During handling of the above exception, another exception occurred:
urllib3.exceptions.ProtocolError: ('Connection aborted.', TimeoutError('The write operation timed out'))
......
During handling of the above exception, another exception occurred:
requests.exceptions.ConnectionError: ('Connection aborted.', TimeoutError('The write operation timed out'))
......
The above exception was the direct cause of the following exception:
invariant_sdk.types.exceptions.InvariantError: Connection error when calling method: POST for path: /api/v1/push/trace.
The connection to the URI was in fact successful but the subsequent write operation timed out because the trace to be pushed is too large due to infinite loops in the response of LLM. But the InvariantError message suggested a connection error which was misleading in the beginning of debugging.
Code
In client.py, the relevant error is handled as below:
Problem Background
When running
client.push_trace(request)
, got the errorinvariant_sdk.types.exceptions.InvariantError: Connection error when calling method: POST for path: /api/v1/push/trace
. The complete traceback of errors is given as follows:The connection to the URI was in fact successful but the subsequent write operation timed out because the trace to be pushed is too large due to infinite loops in the response of LLM. But the InvariantError message suggested a connection error which was misleading in the beginning of debugging.
Code
In
client.py
, the relevant error is handled as below:invariant-sdk/python/invariant_sdk/client.py
Lines 140 to 147 in 50c0ade
Suggestion
In my opinion, it makes more sense to raise
InvariantAPITimeoutError
when it is triggered byrequests.ConnectTimeout
.The text was updated successfully, but these errors were encountered: