Fix OAuth token fetch failures from ad-hoc response persistence (#399)

This commit is contained in:
Gregory Schier authored and GitHub committed 2026-02-19 14:04:34 -08:00
1 parent 7b73401dcf
commit 5a184c1b83
3 files changed
+93 -76

No files matched your search

@@ -61,6 +61,10 @@ export async function fetchAccessToken(
console.log('[oauth2] Got access token response', resp.status);
if (resp.error) {
throw new Error(`Failed to fetch access token: ${resp.error}`);
}
const body = resp.bodyPath ? readFileSync(resp.bodyPath, 'utf8') : '';
if (resp.status < 200 || resp.status >= 300) {