mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 03:04:13 +00:00
fix(aws_secret_manager_V2.py): Error reading secret from AWS Secrets Manager: (#7541)
This commit is contained in:
parent
8ad9526625
commit
cac06a32b8
1 changed files with 5 additions and 1 deletions
|
@ -127,10 +127,14 @@ class AWSSecretsManagerV2(BaseAWSLLM):
|
||||||
response = sync_client.post(
|
response = sync_client.post(
|
||||||
url=endpoint_url, headers=headers, data=body.decode("utf-8")
|
url=endpoint_url, headers=headers, data=body.decode("utf-8")
|
||||||
)
|
)
|
||||||
response.raise_for_status()
|
|
||||||
return response.json()["SecretString"]
|
return response.json()["SecretString"]
|
||||||
except httpx.TimeoutException:
|
except httpx.TimeoutException:
|
||||||
raise ValueError("Timeout error occurred")
|
raise ValueError("Timeout error occurred")
|
||||||
|
except httpx.HTTPStatusError as e:
|
||||||
|
verbose_logger.exception(
|
||||||
|
"Error reading secret from AWS Secrets Manager: %s",
|
||||||
|
str(e.response.text),
|
||||||
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
verbose_logger.exception(
|
verbose_logger.exception(
|
||||||
"Error reading secret from AWS Secrets Manager: %s", str(e)
|
"Error reading secret from AWS Secrets Manager: %s", str(e)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue