atharv9017 opened a new issue, #45881: URL: https://github.com/apache/airflow/issues/45881
### Apache Airflow version 2.10.4 ### If "Other Airflow 2 version" selected, which one? _No response_ ### What happened? When using the S3Hook in a DAG with a transfer operation, providing incorrect types for transfer_config_args does not trigger the appropriate error. Instead, it causes improper handling of transfer configurations and can result in unexpected errors during the S3 file transfer. ### What you think should happen instead? transfer_config_args should be properly validated by checking the types of the provided arguments. A TypeError should be raised when invalid types are provided, instead of the previously raised ValueError. ### How to reproduce Use the S3Hook in a DAG with a transfer operation. Provide incorrect types for transfer_config_args. Observe that the error raised does not properly reflect the type mismatch and leads to improper behavior ### Operating System Windows ### Versions of Apache Airflow Providers _No response_ ### Deployment Virtualenv installation ### Deployment details Installed via pip or using a virtual environment. Custom configuration may include setting up the executor (e.g., LocalExecutor or CeleryExecutor) and modifying Airflow's configuration file (airflow.cfg) to suit local system requirements. For file transfer operations (like S3 integration), using AWS CLI and configuring S3Hook as per Airflow documentation. ### Anything else? This issue has been consistently observed when invalid types are passed as transfer_config_args in the S3Hook, which causes unexpected behavior during file transfers. A possible enhancement would be improving the error handling to raise a TypeError instead of the current ValueError, ensuring better error clarity and handling. ### Are you willing to submit PR? - [x] Yes I am willing to submit a PR! ### Code of Conduct - [x] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md) -- 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: commits-unsubscr...@airflow.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org