diff --git a/bin/build-schemas.ts b/bin/build-schemas.ts index 8d1d3f8..8f6c8ef 100755 --- a/bin/build-schemas.ts +++ b/bin/build-schemas.ts @@ -95,4 +95,9 @@ async function* walk( } } +process.on("unhandledRejection", (reason, promise) => { + console.log("Unhandled Reject at:", promise, "reason:", reason); + process.exit(1); +}); + main(); diff --git a/test/normandy-arguments.ts b/test/normandy-arguments.ts index 98eb12c..ea52c14 100755 --- a/test/normandy-arguments.ts +++ b/test/normandy-arguments.ts @@ -48,4 +48,9 @@ function convertActionNameToTypeName(actionName: string): string { return typeName + "Arguments"; } +process.on("unhandledRejection", (reason, promise) => { + console.log("Unhandled promise rejection:", reason); + process.exit(1); +}); + main();