ashb commented on code in PR #27758:
URL: https://github.com/apache/airflow/pull/27758#discussion_r1054263192


##########
airflow/utils/log/file_task_handler.py:
##########
@@ -253,10 +309,10 @@ def _read(self, ti: TaskInstance, try_number: int, 
metadata: dict[str, Any] | No
                     )
                 # Check if the resource was properly fetched
                 response.raise_for_status()
-
                 log += "\n" + response.text
             except Exception as e:
-                log += f"*** Failed to fetch log file from worker. {str(e)}\n"
+                service_to_fetch_from = LogType.TRIGGER if log_type == 
LogType.TRIGGER else LogType.WORKER
+                log += f"*** Failed to fetch log file from 
{service_to_fetch_from}. {str(e)}\n"

Review Comment:
   Or maybe this
   ```suggestion
                   log += f"*** Failed to fetch log file from {log_type or 
LogType.WORKER}. {str(e)}\n"
   ```



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

Reply via email to