Skip to content
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
7 changes: 7 additions & 0 deletions .changeset/sharp-bottles-agree.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"wrangler": patch
---

Improve error message when request to obtain membership info fails

Wrangler now informs user that specific permission might be not granted when fails to obtain membership info. The same information is provided when Wrangler is unable to fetch user's email.
2 changes: 1 addition & 1 deletion packages/wrangler/src/__tests__/whoami.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ describe("whoami", () => {
└───────────────┴────────────┘
🔓 Token Permissions: If scopes are missing, you may need to logout and re-login.
Scope (Access)
🎢 Unable to get membership roles. Make sure you have permissions to read the account."
🎢 Unable to get membership roles. Make sure you have permissions to read the account. Are you missing the \`User->Memberships->Read\` permission?"
`);
});
});
2 changes: 1 addition & 1 deletion packages/wrangler/src/user/whoami.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ async function printMembershipInfo(user: UserInfo, accountFilter?: string) {
} catch (e) {
if (isAuthenticationError(e)) {
logger.log(
`🎢 Unable to get membership roles. Make sure you have permissions to read the account.`
`🎢 Unable to get membership roles. Make sure you have permissions to read the account. Are you missing the \`User->Memberships->Read\` permission?`
);
return;
} else {
Expand Down