Skip to content

Commit

Permalink
Improve error handling for GitHub App credentials by providing user f…
Browse files Browse the repository at this point in the history
…eedback and exiting gracefully
  • Loading branch information
raffaele-oplabs committed Dec 12, 2024
1 parent 4183e9c commit 895f96c
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 @@ -78,8 +78,9 @@ def get_github_acces_token(
access_token = integration.get_access_token(installation.id).token
typer.echo(f"{access_token}")
else:
raise ValueError(
"Provide GitHub App credentials (app_id, private_key, and repo).")
typer.echo(
f"Provide GitHub App credentials (app_id, private_key, and repo).", err=True)
raise typer.Exit(code=1)


@app.command("create-issue-from-file")
Expand Down

0 comments on commit 895f96c

Please sign in to comment.