jason810496 opened a new pull request, #71375: URL: https://github.com/apache/airflow/pull/71375
## Why The TS SDK `TaskClient` exposes both `getVariable` (returns `null`) and `getVariableOrThrow` (raises `VariableNotFoundError`), but Connections only had the null-returning `getConnection`, so a task that requires a Connection has to hand-write the absence check and has no typed error to catch. ## How - `getConnectionOrThrow` is a thin wrapper over `getConnection`, exactly how `getVariableOrThrow` wraps `getVariable`. - Purely additive: `getConnection` keeps its null-returning contract, and no wire protocol changes. - Mirrors the Go SDK, which already ships a `ConnectionNotFound` sentinel next to `VariableNotFound`. --- ##### Was generative AI tooling used to co-author this PR? - [x] Yes, with help of Claude Code (Opus 5) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) -- 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]
