Skip to content

Commit

Permalink
fix(aws_secret_manager_V2.py): Error reading secret from AWS Secrets …
Browse files Browse the repository at this point in the history
…Manager:
  • Loading branch information
krrishdholakia committed Jan 4, 2025
1 parent 23104d9 commit 520de83
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion litellm/secret_managers/aws_secret_manager_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,14 @@ def sync_read_secret(
response = sync_client.post(
url=endpoint_url, headers=headers, data=body.decode("utf-8")
)
response.raise_for_status()
return response.json()["SecretString"]
except httpx.TimeoutException:
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:
verbose_logger.exception(
"Error reading secret from AWS Secrets Manager: %s", str(e)
Expand Down

0 comments on commit 520de83

Please sign in to comment.