mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-04 20:46:45 +00:00
community[patch]: Add explicit error message to Bedrock error output. (#17328)
- **Description:** Propagate Bedrock errors into Langchain explicitly. Use-case: unset region error is hidden behind 'Could not load credentials...' message - **Issue:** [17654](https://github.com/langchain-ai/langchain/issues/17654) - **Dependencies:** None --------- Co-authored-by: Bagatur <22008038+baskaryan@users.noreply.github.com>
This commit is contained in:
@@ -107,7 +107,7 @@ class BedrockEmbeddings(BaseModel, Embeddings):
|
||||
raise ValueError(
|
||||
"Could not load credentials to authenticate with AWS client. "
|
||||
"Please check that credentials in the specified "
|
||||
"profile name are valid."
|
||||
f"profile name are valid. Bedrock error: {e}"
|
||||
) from e
|
||||
|
||||
return values
|
||||
|
Reference in New Issue
Block a user