community: Enhance Github error prompt (#15248)

- **Description:** The Github error prompt is confused because of JWT
enctrypt to somebody not familiar with Github connection method. This PR
is to add some useful error prompt to help users troubleshooting.
- **Issue:**
https://github.com/langchain-ai/langchain/issues/14550#issuecomment-1867445049
  - **Dependencies:** None,
  - **Twitter handle:** None
pull/15276/head^2
triThirty 9 months ago committed by GitHub
parent d5e1725ace
commit fea4888e72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -85,7 +85,13 @@ class GitHubAPIWrapper(BaseModel):
"https://docs.github.com/en/apps/using-"
"github-apps/installing-your-own-github-app"
)
installation = installation[0]
try:
installation = installation[0]
except ValueError as e:
raise ValueError(
"Please make sure to give correct github parameters "
f"Error message: {e}"
)
# create a GitHub instance:
g = installation.get_github_for_installation()
repo = g.get_repo(github_repository)

Loading…
Cancel
Save