Skip to content

Commit 59cb641

Browse files
committed
Fixed confusing logging
1 parent a47c0e3 commit 59cb641

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/auth.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ async function exchangeCodeForIdAndAuthToken(code: string): Promise<IdTokenRespo
7272
}
7373
});
7474

75+
if (response.status !== 200) {
76+
console.error("Error during token exchange:", response.data);
77+
}
78+
7579
return response.data;
7680
}
7781

@@ -178,7 +182,7 @@ async function startOauth(): Promise<ElawayTokenResponse | null> {
178182

179183
const code = await getAuthorizationCode(page);
180184
if (code) {
181-
console.error("Found authorization code:");
185+
console.info("Found authorization code.");
182186
await browser.close();
183187

184188
accessIdResponse = await exchangeCodeForIdAndAuthToken(code);

0 commit comments

Comments
 (0)