Skip to content

fix(project): suggest 'project' scope instead of 'read:project' - #12601

Closed
kyyril wants to merge 1 commit into
cli:trunkfrom
kyyril:fix/issue-12585
Closed

fix(project): suggest 'project' scope instead of 'read:project'#12601
kyyril wants to merge 1 commit into
cli:trunkfrom
kyyril:fix/issue-12585

Conversation

@kyyril

@kyyril kyyril commented Feb 3, 2026

Copy link
Copy Markdown

Summary

This PR fixes #12585.

Problem: Users receive a confusing error loop when attempting to view projects without sufficient scopes. The CLI suggests adding read:project, but upon doing so, the operation fails again requiring project (write access), leading to a frustrating double-auth cycle.

Solution: The error handling logic now detects when read:project is the missing scope and proactively suggests the broader project scope instead. This ensures users get the necessary permissions in a single step.


Technical Details

Attribute Value
Language Go
Affected Files pkg/cmd/project/shared/queries/queries.go
Verification go test ./pkg/cmd/project/shared/queries

Changes Made

  • Modified handleError in pkg/cmd/project/shared/queries/queries.go to intercept read:project and upgrade the suggestion to project.

Quality Checklist

  • I have read the CONTRIBUTING.md file
  • I have followed the project's code style
  • I have verified my changes work as expected

@kyyril
kyyril requested a review from a team as a code owner February 3, 2026 00:41
@kyyril
kyyril requested a review from tidy-dev February 3, 2026 00:41
@cliAutomation cliAutomation added the external pull request originating outside of the CLI core team label Feb 3, 2026
@BagToad

BagToad commented Feb 3, 2026

Copy link
Copy Markdown
Member

@kyyril, thank you for the PR. I don't think this is the right approach for this. I'm going to close this for now and review the first PR opened for this #12596.

@BagToad BagToad closed this Feb 3, 2026
@kyyril
kyyril deleted the fix/issue-12585 branch February 3, 2026 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external pull request originating outside of the CLI core team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Confusing error message on scopes

3 participants