uranusjr opened a new pull request, #47852: URL: https://github.com/apache/airflow/pull/47852
Second part of https://github.com/apache/airflow/issues/47832#issuecomment-2728399542 With this correct 404 handling, now a failure to fetch an asset results in a cleaner AirflowRuntimeError with some relevant information. Now the log would look like this ``` [2025-03-17, 09:34:39] ERROR - Task failed with exception source="task" error_detail=[{"exc_type":"AirflowRuntimeError","exc_value":"ASSET_NOT_FOUND: {'name': 'bad'}","exc_notes":[],"syntax_error":null,"is_cause":false,"frames":[{"filename":"/opt/airflow/task-sdk/src/airflow/sdk/execution_time/task_runner.py","lineno":599,"name":"run"},{"filename":"/opt/airflow/task-sdk/src/airflow/sdk/execution_time/task_runner.py","lineno":150,"name":"get_template_context"},{"filename":"/opt/airflow/task-sdk/src/airflow/sdk/execution_time/context.py","lineno":304,"name":"__init__"},{"filename":"/opt/airflow/task-sdk/src/airflow/sdk/execution_time/context.py","lineno":278,"name":"_get_asset_from_db"}]}] ``` Tested by triggering this asset-dag (where `bad` references an inlet that does not exist) ```python @asset(schedule=None) def wrong(bad): pass ``` -- 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]
