Skip to content

Commit 8082a56

Browse files
committed
Add url to status code errors
Signed-off-by: paulober <[email protected]>
1 parent 929a8d2 commit 8082a56

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/utils/githubREST.mts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,9 +231,10 @@ async function getReleases(repository: GithubRepository): Promise<string[]> {
231231
headers["if-none-match"] = lastEtag;
232232
}
233233

234+
const url = `${GITHUB_API_BASE_URL}/repos/${owner}/${repo}/releases`;
234235
// eslint-disable-next-line @typescript-eslint/naming-convention
235236
const response = await makeAsyncGetRequest<Array<{ tag_name: string }>>(
236-
`${GITHUB_API_BASE_URL}/repos/${owner}/${repo}/releases`,
237+
url,
237238
headers
238239
);
239240

@@ -261,7 +262,9 @@ async function getReleases(repository: GithubRepository): Promise<string[]> {
261262
// there is no way a rerun will succeed in the near future
262263
throw new Error("GitHub API Code 403 Forbidden. Rate limit exceeded.");
263264
} else if (response.status !== 200) {
264-
throw new Error("Error http status code: " + response.status);
265+
throw new Error(
266+
"Error http status code: " + response.status + " for " + url
267+
);
265268
}
266269

267270
if (response.data !== null) {

0 commit comments

Comments
 (0)