Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

polish: don't log all errors when logging in #789

Merged
merged 1 commit into from
Apr 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .changeset/gentle-cats-destroy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"wrangler": patch
---

polish: don't log all errors when logging in

This removes a couple of logs we had for literally every error in our oauth flow. We throw the error and handle it separately anyway, so this is a safe cleanup.

Fixes https://github.com/cloudflare/wrangler2/issues/788
12 changes: 0 additions & 12 deletions packages/wrangler/src/user.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -699,18 +699,6 @@ async function exchangeRefreshTokenForAccessToken(): Promise<AccessContext> {
};
return accessContext;
} catch (error) {
switch (error) {
case "invalid_grant":
console.warn(
"Expired! Auth code or refresh token needs to be renewed."
);
// alert("Redirecting to auth server to obtain a new auth grant code.");
// TODO: return refreshAuthCodeOrRefreshToken();
break;
default:
console.error(error);
break;
}
if (typeof error === "string") {
throw toErrorClass(error);
} else {
Expand Down