Programmer-RD-AI commented on code in PR #54452:
URL: https://github.com/apache/airflow/pull/54452#discussion_r2276574017
##########
airflow-core/src/airflow/configuration.py:
##########
@@ -902,7 +902,16 @@ def _get_cmd_option(self, section: str, key: str):
if (section, key) in self.sensitive_config_values:
if super().has_option(section, fallback_key):
command = super().get(section, fallback_key)
- return run_command(command)
+ try:
+ cmd_output = run_command(command)
+ except AirflowConfigException as e:
+ raise e
+ except Exception as e:
+ raise AirflowConfigException(
+ f"Cannot run the command for the config section
[{section}]{fallback_key}_cmd."
+ f" Please check the {fallback_key} value."
+ ) from e
Review Comment:
can't this specific error be raised from the run_command it self?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]