BerriAI/litellm · error · RuntimeError
prisma db push failed. Detail: {e}
Error message
prisma db push failed.
Detail: {e} What it means
RuntimeError raised when 'prisma db push' fails or times out on the legacy (use_migrate=False) schema-sync path; the underlying CalledProcessError/TimeoutExpired detail is embedded. Indicates the schema could not be pushed to the database.
Source
Thrown at litellm-proxy-extras/litellm_proxy_extras/utils.py:548
if not use_migrate:
# Preserve `prisma db push` path unchanged.
original_dir = os.getcwd()
os.chdir(migrations_dir)
try:
subprocess.run(
[_get_prisma_command(), "db", "push", "--accept-data-loss"],
timeout=prisma_command_timeout(),
check=True,
env=_get_prisma_env(),
)
return True
except (
subprocess.CalledProcessError,
subprocess.TimeoutExpired,
) as e:
# Re-raise as RuntimeError so proxy_cli.py's
# `except RuntimeError` catches it and exits cleanly.
raise RuntimeError(f"prisma db push failed.\n\nDetail: {e}") from e
finally:
os.chdir(original_dir)
# Informational — never blocks.
ProxyExtrasDBManager._warn_if_db_ahead_of_head(migrations_dir)
original_dir = os.getcwd()
os.chdir(migrations_dir)
try:
for attempt in range(4):
try:
result = subprocess.run(
[_get_prisma_command(), "migrate", "deploy"],
timeout=prisma_command_timeout(),
check=True,
capture_output=True,
text=True,
env=_get_prisma_env(),View on GitHub (pinned to 77b7c6c40c)
Solutions
- Read the Prisma Detail output: fix schema drift, database connectivity, or DATABASE_URL, then rerun prisma db push.
- Ensure the database user has DDL privileges.
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at litellm-proxy-extras/litellm_proxy_extras/utils.py:548 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18).
Data as JSON: /api/errors/740da2eeb8760a3c.
Report an issue: GitHub.