mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-22 23:00:00 +00:00
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
This commit is contained in:
parent
d5e1725ace
commit
fea4888e72
@ -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…
Reference in New Issue
Block a user