VanshBhardwaj24 opened a new pull request, #75356: URL: https://github.com/apache/airflow/pull/75356
`DiscordWebhookOperator.__init__` raised the catch-all `AirflowException` when no `http_conn_id` was passed. That is a caller error in the constructor arguments, so it now raises `ValueError`, matching what #66279 and #68890 did for plain input validation. Part of the ongoing effort to reduce direct `AirflowException` usage; this removes the operator's entry from `generated/known_airflow_exceptions.txt`. The failure happens when the operator is constructed, normally at Dag parse time, so it shows up as a Dag import error either way. Anything that caught `AirflowException` around the constructor would no longer match; I found no such caller in the repo. If maintainers prefer a dedicated subclass of `AirflowException` for backward compatibility, as in #70152 and #71981, I'm happy to switch. The case had no test coverage. `test_missing_http_conn_id_raises_value_error` covers both `None` and `""`, and fails against the previous behaviour with `AirflowException: No valid Discord http_conn_id supplied.`. Checks run: the Discord provider unit tests (32 passed); the new test fails without the source change; `ruff format` and `ruff check` on both files; `mypy` on both files; `check_new_airflow_exception_usage.py` on the changed file and with `--all-files` (no further allowlist changes). Not run: Breeze, the full CI matrix. --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes (Claude Code) Generated-by: Claude Code (Sonnet 5.5) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) I reviewed all of the generated code and ran the checks listed above locally. --- * Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#pull-request-guidelines)** for more information. Note: commit author/co-author name and email in commits become permanently public when merged. * For fundamental code changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals)) is needed. * When adding dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x). * For significant user-facing changes create newsfragment: `{pr_number}.significant.rst`, in [airflow-core/newsfragments](https://github.com/apache/airflow/tree/main/airflow-core/newsfragments). You can add this file in a follow-up commit after the PR is created so you know the PR number. -- 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]
