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

Stack: local-preview unauthorized suggests re-logging in even with a valid token #95

Open
lexton opened this issue Sep 19, 2022 · 1 comment

Comments

@lexton
Copy link
Contributor

lexton commented Sep 19, 2022

The situation plays out as so:

  • User has a valid login session
  • User doesn't have write access to a stack

User is presented with an error + suggested fix that doesn't resolve the issue:

unauthorized: you can re-login using `spacectl profile login`

It would be better to say - you don't have access to this resource, or even this resource doesn't exist rather than suggesting to log in again.

@cube2222
Copy link
Contributor

Good point. Maybe when we're about to display such an error we should make a graphql call akin to "whoami" to see if we have no working session, or whether the session just doesn't have a high enough access level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants