Add debugging

This commit is contained in:
Justin Hutchings
2024-08-26 22:39:44 +00:00
committed by GitHub
parent 01216ee138
commit 9ff0000670
+6 -1
View File
@@ -152,7 +152,8 @@ export default class ComponentDetection {
const repo = "component-detection";
core.debug("Attempting to download latest release from " + serverUrl);
const latestRelease = await octokit.rest.repos.getLatestRelease({
try {
const latestRelease = await octokit.rest.repos.getLatestRelease({
owner, repo
});
@@ -165,6 +166,10 @@ export default class ComponentDetection {
});
return downloadURL;
} catch (error: any) {
core.error(error);
throw new Error("Failed to download latest release");
}
}
}