amoghrajesh commented on code in PR #52968:
URL: https://github.com/apache/airflow/pull/52968#discussion_r2189557663
##########
task-sdk/src/airflow/sdk/execution_time/context.py:
##########
@@ -272,7 +273,12 @@ class ConnectionAccessor:
"""Wrapper to access Connection entries in template."""
def __getattr__(self, conn_id: str) -> Any:
- return _get_connection(conn_id)
+ try:
+ return _get_connection(conn_id)
+ except AirflowRuntimeError as e:
+ if e.error.error == ErrorType.CONNECTION_NOT_FOUND:
+ raise AirflowNotFoundException(f"The conn_id `{conn_id}` isn't
defined")
Review Comment:
Yeah its much better now, thanks
<img width="1726" alt="Image"
src="https://github.com/user-attachments/assets/d6a1a768-0d00-4cd8-ba49-cc76175a2cd7"
/>
--
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]