This is an automated email from the ASF dual-hosted git repository.

jasonliu pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 6a616c5738c Use dedicated exception classes over AirflowException for 
AGENTS.md (#63495)
6a616c5738c is described below

commit 6a616c5738cc09ce727bf8b021e3d00a3cb9fee8
Author: Jason(Zhe-You) Liu <[email protected]>
AuthorDate: Sat Mar 14 18:12:58 2026 +0800

    Use dedicated exception classes over AirflowException for AGENTS.md (#63495)
    
    * Add coding standard: use dedicated exception classes over AirflowException
    
    * Apply suggestions from code review
    
    Co-authored-by: Jarek Potiuk <[email protected]>
    
    * Fix mixed-line-ending static check
    
    ---------
    
    Co-authored-by: Jason(Zhe-You) Liu <[email protected]>
    Co-authored-by: Kaxil Naik <[email protected]>
    Co-authored-by: Jarek Potiuk <[email protected]>
---
 AGENTS.md | 1 +
 1 file changed, 1 insertion(+)

diff --git a/AGENTS.md b/AGENTS.md
index 26608d69cff..63e7bd0f16a 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -85,6 +85,7 @@ UV workspace monorepo. Key paths:
 - In `airflow-core`, functions with a `session` parameter must not call 
`session.commit()`. Use keyword-only `session` parameters.
 - Imports at top of file. Valid exceptions: circular imports, lazy loading for 
worker isolation, `TYPE_CHECKING` blocks.
 - Guard heavy type-only imports (e.g., `kubernetes.client`) with 
`TYPE_CHECKING` in multi-process code paths.
+- Define dedicated exception classes or use existing exceptions such as 
`ValueError` instead of raising the broad `AirflowException` directly. Each 
error case should have a specific exception type that conveys what went wrong.
 - Apache License header on all new files (prek enforces this).
 
 ## Testing Standards

Reply via email to