Skip to content

Commit

Permalink
Improve GitHub client authentication error handling by providing user…
Browse files Browse the repository at this point in the history
… feedback and exiting gracefully
  • Loading branch information
raffaele-oplabs committed Dec 12, 2024
1 parent 895f96c commit bea9429
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions github_utility/github_cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ def get_github_client(
if github_token:
return Github(github_token)
else:
raise ValueError(
"Provide a GitHub token to authenticate with GitHub.")
typer.echo(
f"Provide a GitHub token to authenticate with GitHub.", err=True)
raise typer.Exit(code=1)


@app.command("get-github-access-token")
Expand Down

0 comments on commit bea9429

Please sign in to comment.