mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-14 23:21:35 +00:00
fix: fail proxy startup if prisma migrate fails
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
6e09a52456
commit
4714128da5
1 changed files with 8 additions and 1 deletions
|
|
@ -853,7 +853,14 @@ def run_server( # noqa: PLR0915
|
|||
):
|
||||
check_prisma_schema_diff(db_url=None)
|
||||
else:
|
||||
PrismaManager.setup_database(use_migrate=not use_prisma_db_push)
|
||||
if not PrismaManager.setup_database(use_migrate=not use_prisma_db_push):
|
||||
import sys
|
||||
|
||||
print( # noqa
|
||||
"\033[1;31mLiteLLM Proxy: Database setup failed after multiple retries. "
|
||||
"The proxy cannot start safely. Please check your database connection and migration status.\033[0m"
|
||||
)
|
||||
sys.exit(1)
|
||||
else:
|
||||
print( # noqa
|
||||
f"Unable to connect to DB. DATABASE_URL found in environment, but prisma package not found." # noqa
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue