-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve Error Handling in Indexify Python SDK #891
Comments
There's a few different types of errors. I guess this will surface when you make the changes. For the worker and related code (anything that ends up touching the user, ie. graph, code), does it make sense to capture only the task Id rather than a lot of data such as inputs? With task id we might be able to use the server blog store to retrieve inputs/outputs. |
@stangirala ah ok i get the context that you were talking about now wrt #900 . few thoughts
|
related #909 |
Improve Error Handling in Indexify Python SDK
Issue Description
The current implementation of the Indexify Python SDK lacks robust error handling and reporting mechanisms.
Specific Examples
indexify/remote_client.py
, the_request
method:Issues:
httpx.ConnectError
, ignoring other potential exceptions.indexify/executor/function_worker.py
, theasync_submit
method:Issues:
indexify/executor/agent.py
, thetask_completion_reporter
method:Issues:
Exception
catch, which may mask specific errors.Proposed Solution
Create a custom exception hierarchy:
IndexifyException
class.NetworkError
,ExecutionError
,ConfigurationError
).Implement a centralized error handling and logging mechanism:
ErrorHandler
class that can be configured with custom logging and reporting options.ErrorHandler
consistently throughout the SDK.Enhance error context:
Improve retry mechanisms:
Add error callback support:
Implementation Plan
indexify/exceptions.py
.ErrorHandler
class inindexify/error_handling.py
.ErrorHandler
:remote_client.py
to use specific exceptions and theErrorHandler
.function_worker.py
to provide more context in errors and use theErrorHandler
.agent.py
with improved error handling and retry logic.The text was updated successfully, but these errors were encountered: