mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 10:44:24 +00:00
(fix) add bedrock exception mapping for Auth
This commit is contained in:
parent
cc2b19b893
commit
640541f2ce
1 changed files with 7 additions and 0 deletions
|
@ -2495,6 +2495,13 @@ def exception_type(
|
|||
model=model,
|
||||
llm_provider="bedrock"
|
||||
)
|
||||
if "The security token included in the request is invalid":
|
||||
exception_mapping_worked = True
|
||||
raise AuthenticationError(
|
||||
message=f"BedrockException Invalid Authentication - {error_str}",
|
||||
model=model,
|
||||
llm_provider="bedrock"
|
||||
)
|
||||
elif custom_llm_provider == "sagemaker":
|
||||
if "Unable to locate credentials" in error_str:
|
||||
exception_mapping_worked = True
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue