Repository navigation
Add ConnectionNotFoundError to the TypeScript SDK - #71375
Merged
guan404ming merged 1 commit intoAug 11, 2026
Merged
Conversation
Variable lookups already offer both shapes: getVariable returns null and getVariableOrThrow raises a typed error. Connections only had the null-returning half, so a task that genuinely requires a Connection had to hand-write the absence check and had no error type to catch. The Go SDK already exposes a ConnectionNotFound sentinel next to VariableNotFound.
uros-b
approved these changes
Aug 10, 2026
uranusjr
approved these changes
Aug 11, 2026
phanikumv
approved these changes
Aug 11, 2026
guan404ming
approved these changes
Aug 11, 2026
dabla
pushed a commit
to dabla/airflow
that referenced
this pull request
Aug 14, 2026
Variable lookups already offer both shapes: getVariable returns null and getVariableOrThrow raises a typed error. Connections only had the null-returning half, so a task that genuinely requires a Connection had to hand-write the absence check and had no error type to catch. The Go SDK already exposes a ConnectionNotFound sentinel next to VariableNotFound.
imrichardwu
pushed a commit
to imrichardwu/airflow
that referenced
this pull request
Sep 11, 2026
Variable lookups already offer both shapes: getVariable returns null and getVariableOrThrow raises a typed error. Connections only had the null-returning half, so a task that genuinely requires a Connection had to hand-write the absence check and had no error type to catch. The Go SDK already exposes a ConnectionNotFound sentinel next to VariableNotFound.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The TS SDK
TaskClientexposes bothgetVariable(returnsnull) andgetVariableOrThrow(raisesVariableNotFoundError), but Connections only had the null-returninggetConnection, so a task that requires a Connection has to hand-write the absence check and has no typed error to catch.How
getConnectionOrThrowis a thin wrapper overgetConnection, exactly howgetVariableOrThrowwrapsgetVariable.getConnectionkeeps its null-returning contract, and no wire protocol changes.ConnectionNotFoundsentinel next toVariableNotFound.Was generative AI tooling used to co-author this PR?