-
Notifications
You must be signed in to change notification settings - Fork 145
Open
Description
Is your feature request related to a problem?
- Yes, it is related to a problem
Describe the feature you'd like
🌟 Feature Description
Enhance the database connection setup by safely encoding sensitive credentials (such as the database password) using urllib.parse.quote_plus. This ensures that special characters in credentials do not break the database connection URL.
🔍 Problem Statement
Currently, database credentials are interpolated directly into the connection string:
DATABASE_URL = f"postgresql+asyncpg://{USER}:{PASSWORD}@{HOST}:{PORT}/{DBNAME}"
If the database password contains special characters like @, :, /, #, or %, the connection string becomes malformed, leading to confusing runtime errors such as:
socket.gaierror: nodename nor servname provided
This issue is hard to debug and commonly occurs with managed databases like Supabase, where passwords often include special characters.
🎯 Expected Outcome
- Database credentials, especially the password, are safely URL-encoded before being used in the connection string.
- Prevents connection failures caused by malformed URLs.
- Improves robustness and developer experience when configuring environment variables.
Record
- I agree to follow this project's Code of Conduct
- I want to work on implementing this feature
Metadata
Metadata
Assignees
Labels
No labels