diff --git a/Extensions/XplatGenerateReleaseNotes/XplatGenerateReleaseNotesTask/src/GenerateReleaseNotesConsoleTester.ts b/Extensions/XplatGenerateReleaseNotes/XplatGenerateReleaseNotesTask/src/GenerateReleaseNotesConsoleTester.ts index d380dd45..065c99a4 100644 --- a/Extensions/XplatGenerateReleaseNotes/XplatGenerateReleaseNotesTask/src/GenerateReleaseNotesConsoleTester.ts +++ b/Extensions/XplatGenerateReleaseNotes/XplatGenerateReleaseNotesTask/src/GenerateReleaseNotesConsoleTester.ts @@ -14,7 +14,7 @@ async function run(): Promise { var gitHubPat = argv["githubpat"]; var bitbucketUser = argv["bitbucketuser"]; var bitbucketSecret = argv["bitbucketsecret"]; - var payloadFile = argv["payloadfile"]; + var payloadFile = argv["payloadFile"]; var showUsage = false; if (!filename || filename.length === 0) { diff --git a/Extensions/XplatGenerateReleaseNotes/XplatGenerateReleaseNotesTask/src/ReleaseNotesFunctions.ts b/Extensions/XplatGenerateReleaseNotes/XplatGenerateReleaseNotesTask/src/ReleaseNotesFunctions.ts index 0a35f33f..a4e6d0ed 100644 --- a/Extensions/XplatGenerateReleaseNotes/XplatGenerateReleaseNotesTask/src/ReleaseNotesFunctions.ts +++ b/Extensions/XplatGenerateReleaseNotes/XplatGenerateReleaseNotesTask/src/ReleaseNotesFunctions.ts @@ -91,6 +91,10 @@ import { stringify } from "querystring"; import { Exception } from "handlebars"; import { IdentityDisplayFormat } from "azure-devops-node-api/interfaces/WorkInterfaces"; +process.on("uncaughtException", (error) => { + console.error("Uncaught Exception:", error); +}); + let agentApi = new AgentSpecificApi(); export function getDeploymentCount(environments: ReleaseEnvironment[], environmentName: string): number { @@ -968,7 +972,7 @@ export function processTemplate( handlebars.registerHelper("lookup_a_work_item", function (array, url) { var urlParts = url.split("/"); var wiId = parseInt(urlParts[urlParts.length - 1]); - return array.find(element => element.id === wiId); + return array.find(element => element?.id === wiId); }); // add our helper to find test configuration