Skip to content

Commit e4e652f

Browse files
fix(schematics): log the caught error when dataconnect.yaml parsing fails (#3711)
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.
1 parent b57868d commit e4e652f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/schematics/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ export function parseDataConnectConfig(
375375
package: connectorJson.generate.javascriptSdk.package,
376376
angular: connectorJson.generate.javascriptSdk.angular,
377377
};
378-
} catch (_) {
378+
} catch (e) {
379379
console.error("Couldn't parse dataconnect.yaml", e);
380380
return null;
381381
}

0 commit comments

Comments
 (0)