fix(schematics): log the caught error when dataconnect.yaml parsing fails#3711
Open
armando-navarro wants to merge 1 commit into
Open
fix(schematics): log the caught error when dataconnect.yaml parsing fails#3711armando-navarro wants to merge 1 commit into
armando-navarro wants to merge 1 commit into
Conversation
…ails The catch handler names its error variable _ but logs e, which is not defined anywhere. When a malformed dataconnect.yaml lands in this handler, evaluating e throws a ReferenceError from inside the catch — so instead of warning and continuing with null, the whole schematic crashes with an unrelated-looking error. Nothing typechecks this file today (the library build excludes the schematics and esbuild does not check types), which is how the undefined identifier survived.
tyler-reitz
approved these changes
Jul 9, 2026
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.
Fixes #3710
One-line fix: the catch handler in
parseDataConnectConfignames its error variable_but logse, which is undefined — so the intended soft-fail path (warn and returnnull) instead crashes the schematic with aReferenceError. Renaming the variable toemakes the handler do what it was written to do.No behavior change on the success path. The file isn't covered by any typecheck today (the library build excludes the schematics; esbuild doesn't check types), which is how this survived — a
tsc --noEmitpass oversrc/schematicswould catch this class of bug at build time.