From 95cba2c6e7f3aa49b62bb805bed8d8438eab93d5 Mon Sep 17 00:00:00 2001 From: Armando Navarro Date: Wed, 8 Jul 2026 19:44:00 -0700 Subject: [PATCH] fix(schematics): log the caught error when dataconnect.yaml parsing fails MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- src/schematics/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/schematics/utils.ts b/src/schematics/utils.ts index d6e0d075a..7c8ddfd73 100644 --- a/src/schematics/utils.ts +++ b/src/schematics/utils.ts @@ -375,7 +375,7 @@ export function parseDataConnectConfig( package: connectorJson.generate.javascriptSdk.package, angular: connectorJson.generate.javascriptSdk.angular, }; - } catch (_) { + } catch (e) { console.error("Couldn't parse dataconnect.yaml", e); return null; }