fix(startup): use process.exit(1) for NODE_ENV validation, not throw#174
fix(startup): use process.exit(1) for NODE_ENV validation, not throw#1746figpsolseeker wants to merge 1 commit intodcccrypto:mainfrom
Conversation
NODE_ENV validation at startup used `throw new Error(...)` while every other env-var check in the same file (SUPABASE_URL, SUPABASE_KEY, API_AUTH_KEY, API_PORT, DB connectivity) uses `process.exit(1)` after logging. The throw produces an uncaught exception with a stack trace instead of the clean structured-log + exit pattern the rest of the startup sequence follows, confusing ops when NODE_ENV is misconfigured. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 14 minutes and 20 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
throw new Error(...)while every other env-var check in the same file (SUPABASE_URL,SUPABASE_KEY,API_AUTH_KEY,API_PORT, DB connectivity) usesprocess.exit(1)after structured logging.throwproduces an uncaught exception with a noisy stack trace instead of the clean log-and-exit pattern, confusing operators when NODE_ENV is misconfigured.throw new Error(...)→process.exit(1). The structured error log on the preceding line already captures all diagnostic context.Test plan
npx tsc --noEmit— cleantests/routes/prices.test.tsissue onmain, unrelated)