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.
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.