bug: Missing environment variable validation #7
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
The configuration module (
src/app/configs/index.ts) reads environment variables without validating that required variables are set. This causes undefined values to be used at runtime, leading to cryptic errors or security issues when connecting to databases, Redis, or using JWT secrets.Location
src/app/configs/index.tsconfigsobjectHow to Fix
Add validation to ensure required environment variables are present at startup:
Acceptance Criteria