Skip to content

Commit

Permalink
github: update error messages related to authentication token (#264)
Browse files Browse the repository at this point in the history
  • Loading branch information
devmatteini committed Jan 20, 2025
1 parent e0c1ac8 commit 5ab1146
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/github/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ impl std::fmt::Display for GithubError {
let message = format!(
"GitHub API rate limit exceeded.
Export one of {} environment variable to avoid this error.
Otherwise, login with GitHub cli 'gh auth login' to use the authentication token automatically.
More information can be found at https://github.com/devmatteini/dra#usage",
authentication_tokens()
);
Expand All @@ -48,7 +50,8 @@ More information can be found at https://github.com/devmatteini/dra#usage",
GithubError::Unauthorized => {
let message = format!(
"Invalid GitHub credentials.
Make sure one of {} is valid",
Make sure one of {} environment variable is valid.
Otherwise, login with GitHub cli 'gh auth login' to use the authentication token automatically.",
authentication_tokens()
);
f.write_str(&message)
Expand Down

0 comments on commit 5ab1146

Please sign in to comment.