Skip to content

Commit 9ff0000

Browse files
authored
Add debugging
1 parent 01216ee commit 9ff0000

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

componentDetection.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,8 @@ export default class ComponentDetection {
152152
const repo = "component-detection";
153153
core.debug("Attempting to download latest release from " + serverUrl);
154154

155-
const latestRelease = await octokit.rest.repos.getLatestRelease({
155+
try {
156+
const latestRelease = await octokit.rest.repos.getLatestRelease({
156157
owner, repo
157158
});
158159

@@ -165,6 +166,10 @@ export default class ComponentDetection {
165166
});
166167

167168
return downloadURL;
169+
} catch (error: any) {
170+
core.error(error);
171+
throw new Error("Failed to download latest release");
172+
}
168173
}
169174
}
170175

0 commit comments

Comments
 (0)