Add a log for the url (#282098)

so it's clear what fails. We saw rate limiting from GH EDU.
This commit is contained in:
Tyler James Leonhardt
2025-12-08 16:51:11 -08:00
committed by GitHub
parent 6f28b3265a
commit 55d06aa3a1
2 changed files with 3 additions and 0 deletions

View File

@@ -301,9 +301,11 @@ export class GitHubServer implements IGitHubServer {
? 'faculty'
: 'none';
} else {
this._logger.info(`Unable to resolve optional EDU details. Status: ${result.status} ${result.statusText}`);
edu = 'unknown';
}
} catch (e) {
this._logger.info(`Unable to resolve optional EDU details. Error: ${e}`);
edu = 'unknown';
}

View File

@@ -110,6 +110,7 @@ async function fetchWithFallbacks(availableFetchers: readonly Fetcher[], url: st
async function tryFetch(fetcher: Fetcher, url: string, options: FetchOptions, logService: Log): Promise<{ ok: boolean; response: FetchResponse } | { ok: false; err: any }> {
try {
logService.debug(`FetcherService: trying fetcher ${fetcher.name} for ${url}`);
const response = await fetcher.fetch(url, options);
if (!response.ok) {
logService.info(`FetcherService: ${fetcher.name} failed with status: ${response.status} ${response.statusText}`);