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

Print login required output when token is expired #516

Merged
merged 1 commit into from
Jan 3, 2024

Conversation

mahlunar
Copy link
Member

@mahlunar mahlunar commented Jan 3, 2024

Currently, when the oauth2 token is expired, a generic error is outputtet which does not help with what to do.

This change prints the login required output instead to make it easier to progress.

Before:

./hamctl status
Error: Get "https://release-manager.lunar.tech/status?service=deferred-messages": oauth2: token expired and refresh token is not set (reference: 8af307a4-e114-4c98-a125-61f97a1ada09)

After:

./hamctl status
You are not logged in. To log in, please run the following command:
 'hamctl login'

@mahlunar mahlunar requested a review from a team as a code owner January 3, 2024 09:16
@github-actions github-actions bot added the patch label Jan 3, 2024
@mahlunar mahlunar merged commit e5c3975 into master Jan 3, 2024
3 checks passed
@mahlunar mahlunar deleted the fix/token-expired branch January 3, 2024 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants