Skip to content
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

[BUG]Refine Error Handling Strategy in execute_single Function #466

Open
saimedhi opened this issue Feb 21, 2024 · 2 comments
Open

[BUG]Refine Error Handling Strategy in execute_single Function #466

saimedhi opened this issue Feb 21, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@saimedhi
Copy link
Contributor

Describe the bug
Improve the error handling in the execute_single() function by limiting it to general, top-level exceptions and implementing a dedicated error handling mechanism within individual runners. For example, using a wrapper around each runner to catch and manage exceptions specific to their operations.

To Reproduce
For example, in the CreateIndex runner, when invoking opensearch.indices.create(index=index, body=body, **api_params), error handling occurs at the execute_single level, located several layers up the stack. As a result, pinpointing the exact source of errors becomes challenging for users.

Expected behavior
This approach ensures that execute_single() remains clean and focused on its primary responsibility, while runners are equipped with custom error handling tailored to their specific needs. This strategy enhances code readability and error management efficiency.

@saimedhi saimedhi added bug Something isn't working untriaged labels Feb 21, 2024
@gkamat gkamat removed the untriaged label Feb 27, 2024
@gkamat
Copy link
Collaborator

gkamat commented Feb 27, 2024

This will be the right approach so that additional client support can be eventually added.

@gkamat
Copy link
Collaborator

gkamat commented Oct 15, 2024

@saimedhi, since you have implemented some related changes, do you plan to work on this as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants