Skip to content

(debugging AWS Secret Manager) #9031

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 6 additions & 13 deletions litellm/secret_managers/aws_secret_manager_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,11 @@ async def async_read_secret(
response.raise_for_status()
return response.json()["SecretString"]
except httpx.TimeoutException:
raise ValueError("Timeout error occurred")
raise ValueError(f"Timeout error occurred for secret name={secret_name}")
except Exception as e:
verbose_logger.exception(
"Error reading secret from AWS Secrets Manager: %s", str(e)
raise ValueError(
f"Error reading secret name={secret_name} from AWS Secrets Manager: {str(e)}"
)
return None

def sync_read_secret(
self,
Expand Down Expand Up @@ -135,17 +134,11 @@ def sync_read_secret(
)
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),
)
raise ValueError(f"Timeout error occurred for secret name={secret_name}")
except Exception as e:
verbose_logger.exception(
"Error reading secret from AWS Secrets Manager: %s", str(e)
raise ValueError(
f"Error reading secret name={secret_name} from AWS Secrets Manager: {str(e)}"
)
return None

async def async_write_secret(
self,
Expand Down